enabled) { __("This page is restricted to authorized staff"); 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)) { __("This page is restricted to authorized staff"); exit(); } if ($pass != $passconf) { $error = _("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)){ $error=$err->errstr(); include("adm_edit.php"); } else { $error=_("The member has been successfully edited"); include("adm_list.php"); }