mirror of
https://github.com/webmin/webmin.git
synced 2026-02-03 14:13:29 +00:00
UI to enable forgotten password recovery
This commit is contained in:
@@ -152,7 +152,16 @@ elsif ($in{'md5pass'} == 3) {
|
||||
$need = &acl::check_yescrypt();
|
||||
$need && &error(&text('session_eyescrypt', "<tt>$need</tt>"));
|
||||
}
|
||||
|
||||
$gconfig{'md5pass'} = $in{'md5pass'};
|
||||
|
||||
# Save forgotten password mode
|
||||
if ($in{'forgot'} && &foreign_installed("virtualmin-password-recovery") &&
|
||||
$text{'session_postfix'} =~ /virtualmin-password-recovery/) {
|
||||
&error(&text('session_eforgot', 'edit_mods.cgi?tab=delete'));
|
||||
}
|
||||
$gconfig{'forgot_pass'} = $in{'forgot'};
|
||||
|
||||
&write_file("$config_directory/config", \%gconfig);
|
||||
&unlock_file("$config_directory/config");
|
||||
|
||||
|
||||
@@ -150,6 +150,10 @@ print &ui_table_row($text{'session_passapi'},
|
||||
[ 1, $text{'session_passapi1'} . " " .
|
||||
&ui_help(&text('session_passurl', "<tt>$url</tt>")) ] ]));
|
||||
|
||||
# Enable forgotten password recovery
|
||||
print &ui_table_row($text{'session_forgot'},
|
||||
&ui_yesno_radio("forgot", $gconfig{'forgot_pass'}));
|
||||
|
||||
print ui_table_end();
|
||||
print ui_form_end([ [ "save", $text{'save'} ] ]);
|
||||
|
||||
|
||||
@@ -676,6 +676,8 @@ session_passapi=Enable remote password change API?
|
||||
session_passapi0=API disabled
|
||||
session_passapi1=API enabled for Unix users
|
||||
session_passurl=When enabled, user passwords can be changed via a POST request to $1
|
||||
session_forgot=Allow forgotten password recovery?
|
||||
session_eforgot=Forgotten password recovery cannot be enabled unless the <b>Virtualmin Password Recovery</b> plugin module is first removed. This can be done on the <a href='$1'>Webmin Modules</a> page.
|
||||
|
||||
assignment_title=Reassign Modules
|
||||
assignment_header=Module category assignments
|
||||
|
||||
Reference in New Issue
Block a user