When reset webConfigurator password, if authentication server is not Local Database, ask user to back to it. Fix #3341
This commit is contained in:
parent
338ded9b3c
commit
61422dd487
|
@ -44,6 +44,14 @@ The webConfigurator admin password and privileges will be reset to the default (
|
|||
gettext('Do you want to proceed [y|n]?');
|
||||
|
||||
if (strcasecmp(chop(fgets($fp)), "y") == 0) {
|
||||
if (isset($config['system']['webgui']['authmode']) &&
|
||||
$config['system']['webgui']['authmode'] != "Local Database") {
|
||||
echo "\n" . gettext('
|
||||
The User manager authentication server is set to "' . $config['system']['webgui']['authmode'] . '".') . "\n" .
|
||||
gettext('Do you want to set it back to Local Database [y|n]?');
|
||||
if (strcasecmp(chop(fgets($fp)), "y") == 0)
|
||||
$config['system']['webgui']['authmode'] = "Local Database";
|
||||
}
|
||||
$admin_user =& getUserEntryByUID(0);
|
||||
if (!$admin_user) {
|
||||
echo "Failed to locate the admin user account! Attempting to restore access.\n";
|
||||
|
|
Reference in New Issue