mirror of
https://github.com/moodle/moodle.git
synced 2025-03-21 08:00:37 +01:00
Merge branch 'master-MDL-64865' of https://github.com/kristian-94/moodle
This commit is contained in:
commit
f0f6f79027
@ -3906,13 +3906,19 @@ function get_enabled_auth_plugins($fix=false) {
|
||||
|
||||
if ($fix) {
|
||||
$auths = array_unique($auths);
|
||||
$oldauthconfig = implode(',', $auths);
|
||||
foreach ($auths as $k => $authname) {
|
||||
if (!exists_auth_plugin($authname) or in_array($authname, $default)) {
|
||||
$authplugindoesnotexist = !exists_auth_plugin($authname);
|
||||
if ($authplugindoesnotexist || in_array($authname, $default)) {
|
||||
if ($authplugindoesnotexist) {
|
||||
debugging(get_string('authpluginnotfound', 'debug', $authname));
|
||||
}
|
||||
unset($auths[$k]);
|
||||
}
|
||||
}
|
||||
$newconfig = implode(',', $auths);
|
||||
if (!isset($CFG->auth) or $newconfig != $CFG->auth) {
|
||||
add_to_config_log('auth', $oldauthconfig, $newconfig, 'core');
|
||||
set_config('auth', $newconfig);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user