aboutsummaryrefslogtreecommitdiff
path: root/externallib.php
diff options
context:
space:
mode:
authorValentin Popov <info@valentineus.link>2017-12-12 21:41:29 +0300
committerValentin Popov <info@valentineus.link>2017-12-12 21:41:29 +0300
commitd68932e0749b6d71de5583a6b09948cf10d11083 (patch)
tree956bf4c5e5e8782432cd4883fe36c897bf98a7d5 /externallib.php
parentd686a307350a39a00560e054e1bbbecc5d259483 (diff)
downloadlocal_billingpatch-0.0.3.tar.xz
local_billingpatch-0.0.3.zip
Correcting stupid mistakesHEADv0.0.3master
Diffstat (limited to 'externallib.php')
-rw-r--r--externallib.php4
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));
}