diff options
author | Valentin Popov <info@valentineus.link> | 2017-12-12 21:41:29 +0300 |
---|---|---|
committer | Valentin Popov <info@valentineus.link> | 2017-12-12 21:41:29 +0300 |
commit | d68932e0749b6d71de5583a6b09948cf10d11083 (patch) | |
tree | 956bf4c5e5e8782432cd4883fe36c897bf98a7d5 /externallib.php | |
parent | d686a307350a39a00560e054e1bbbecc5d259483 (diff) | |
download | local_billingpatch-master.tar.xz local_billingpatch-master.zip |
Diffstat (limited to 'externallib.php')
-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)); } |