MDL-70766 auth: Add all auth plugin changes to configlog

This commit is contained in:
Brendan Heywood 2021-02-02 12:41:18 +11:00
parent 4e398ff3f7
commit 6b48a24cc6
2 changed files with 16 additions and 5 deletions

View File

@ -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;

View File

@ -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) {