diff --git a/admin/auth.php b/admin/auth.php index c45b0da93cf..0044a429d7e 100644 --- a/admin/auth.php +++ b/admin/auth.php @@ -44,7 +44,9 @@ switch ($action) { $key = array_search($auth, $authsenabled); if ($key !== false) { unset($authsenabled[$key]); - set_config('auth', implode(',', $authsenabled)); + $value = implode(',', $authsenabled); + add_to_config_log('auth', $CFG->auth, $value, 'core'); + set_config('auth', $value); } if ($auth == $CFG->registerauth) { @@ -59,8 +61,11 @@ switch ($action) { if (!in_array($auth, $authsenabled)) { $authsenabled[] = $auth; $authsenabled = array_unique($authsenabled); - set_config('auth', implode(',', $authsenabled)); + $value = implode(',', $authsenabled); + add_to_config_log('auth', $CFG->auth, $value, 'core'); + set_config('auth', $value); } + \core\session\manager::gc(); // Remove stale sessions. core_plugin_manager::reset_caches(); break; @@ -76,7 +81,9 @@ switch ($action) { $fsave = $authsenabled[$key]; $authsenabled[$key] = $authsenabled[$key + 1]; $authsenabled[$key + 1] = $fsave; - set_config('auth', implode(',', $authsenabled)); + $value = implode(',', $authsenabled); + add_to_config_log('auth', $CFG->auth, $value, 'core'); + set_config('auth', $value); } break; @@ -91,7 +98,9 @@ switch ($action) { $fsave = $authsenabled[$key]; $authsenabled[$key] = $authsenabled[$key - 1]; $authsenabled[$key - 1] = $fsave; - set_config('auth', implode(',', $authsenabled)); + $value = implode(',', $authsenabled); + add_to_config_log('auth', $CFG->auth, $value, 'core'); + set_config('auth', $value); } break; diff --git a/lib/classes/plugininfo/auth.php b/lib/classes/plugininfo/auth.php index 9d2b7d68257..86302a2c7be 100644 --- a/lib/classes/plugininfo/auth.php +++ b/lib/classes/plugininfo/auth.php @@ -121,7 +121,9 @@ class auth extends base { } if (($key = array_search($this->name, $auths)) !== false) { unset($auths[$key]); - set_config('auth', implode(',', $auths)); + $value = implode(',', $auths); + add_to_config_log('auth', $CFG->auth, $value, 'core'); + set_config('auth', $value); } if (!empty($CFG->registerauth) and $CFG->registerauth === $this->name) {