Commit 0cc48be6 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Reset disablelogin in config during upgrade

parent e2890beb
......@@ -39,6 +39,7 @@ if (empty($upgrades['disablelogin'])) {
auth_setup();
}
unset($upgrades['disablelogin']);
set_config('disablelogin', null);
if (!$upgrades) {
die_info(get_string('noupgrades', 'admin'));
......
......@@ -333,7 +333,7 @@ function auth_setup () {
($siteclosed && !$cfgsiteclosed)
|| (!$siteclosed && $cfgsiteclosed)) {
set_config('siteclosed', $siteclosed);
if ($config->disablelogin) {
if ($config->disablelogin && $siteclosed) {
set_config('disablelogin', 1);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment