Force une synchro du profil de quota si celui ci change
This commit is contained in:
Alan Garcia 2013-10-17 15:27:06 +00:00
parent d3b69205f8
commit b9d513a81e
1 changed files with 3 additions and 1 deletions

View File

@ -664,9 +664,11 @@ EOF;
$ssq=""; $ssq="";
} }
$old_mem = $this->get($uid);
if (($db->query("UPDATE local SET nom='$nom', prenom='$prenom' WHERE uid='$uid';")) if (($db->query("UPDATE local SET nom='$nom', prenom='$prenom' WHERE uid='$uid';"))
&&($db->query("UPDATE membres SET mail='$mail', canpass='$canpass', enabled='$enabled', `type`='$type', notes='$notes' $ssq WHERE uid='$uid';"))){ &&($db->query("UPDATE membres SET mail='$mail', canpass='$canpass', enabled='$enabled', `type`='$type', notes='$notes' $ssq WHERE uid='$uid';"))){
if($reset_quotas == "on") { if($reset_quotas == "on" || $type != $old_mem['type'] ) {
$quota->addquotas(); $quota->addquotas();
$quota->synchronise_user_profile(); $quota->synchronise_user_profile();
} }