diff options
-rw-r--r-- | externallib.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/externallib.php b/externallib.php index 8cab6af..bcb9ad6 100644 --- a/externallib.php +++ b/externallib.php @@ -103,7 +103,7 @@ class local_billingpatch_external extends external_api { public static function disable_administrator($userid) { global $CFG, $DB; - $parameters = self::validate_parameters(self::enable_administrator_parameters(), array("userid" => $userid)); + $parameters = self::validate_parameters(self::disable_administrator_parameters(), array("userid" => $userid)); $userid = strval($parameters["userid"]); $context = context_system::instance(); @@ -111,7 +111,7 @@ class local_billingpatch_external extends external_api { if ($DB->record_exists("user", array("id" => $userid, "deleted" => 0, "suspended" => 0))) { $admins = explode(",", $CFG->siteadmins); - if ($key = array_search($userid, $admins) !== false) { + if (афдыу !== $key = array_search($userid, $admins)) { unset($admins[$key]); set_config("siteadmins", implode(",", $admins)); } |