enabled) { $msg->raise('Error', "admin", _("This page is restricted to authorized staff")); echo $msg->msg_html_all(); exit(); } $subadmin=variable_get("subadmin_restriction"); $fields = array ( "uid" => array ("post", "integer", 0), "enabled" => array ("post", "boolean", true), "pass" => array ("post", "string", ""), "passconf" => array ("post", "string", ""), "canpass" => array ("post", "boolean", true), "notes" => array ("post", "string", ""), "nom" => array ("post", "string", ""), "prenom" => array ("post", "string", ""), "nmail" => array ("post", "string", ""), "type" => array ("post", "string", ""), "duration" => array ("post", "integer", 0), "reset_quotas" => array ("post", "string", false), ); getFields($fields); if ($subadmin==0 && !$admin->checkcreator($uid)) { $msg->raise('Error', "admin", _("This page is restricted to authorized staff")); echo $msg->msg_html_all(); exit(); } if ($pass != $passconf) { $msg->raise("Error", "admin", _("Passwords do not match")); include("adm_edit.php"); exit(); } // When changing its own account, enabled forced to 1. if ($uid==$mem->user["uid"]) { $enabled=1; } if (!$admin->update_mem($uid, $nmail, $nom, $prenom, $pass, $enabled, $canpass, $type, $duration, $notes, $reset_quotas)){ include("adm_edit.php"); } else { $msg->raise("Ok", "admin", _("The member has been successfully edited")); include("adm_list.php"); }