version 1.45, 2019/04/26 20:22:18
|
version 1.46, 2019/08/30 00:09:39
|
Line 305 END
|
Line 305 END
|
my $earlyout; |
my $earlyout; |
unless ($passwdconf{'captcha'} eq 'unused') { |
unless ($passwdconf{'captcha'} eq 'unused') { |
my ($captcha_chk,$captcha_error) = |
my ($captcha_chk,$captcha_error) = |
&Apache::loncommon::captcha_response('passwords',$server); |
&Apache::loncommon::captcha_response('passwords',$server,$dom_in_effect); |
if ($captcha_chk != 1) { |
if ($captcha_chk != 1) { |
my $error = 'captcha'; |
my $error = 'captcha'; |
if ($passwdconf{'captcha'} eq 'recaptcha') { |
if ($passwdconf{'captcha'} eq 'recaptcha') { |
Line 359 END
|
Line 359 END
|
} |
} |
foreach my $item (@items) { |
foreach my $item (@items) { |
if ($item =~ /^[^\@]+\@[^\@]+\.[^\@\.]+$/) { |
if ($item =~ /^[^\@]+\@[^\@]+\.[^\@\.]+$/) { |
unless (grep(/^\Q$item\E$/i,@allemails)) { |
unless (grep(/^\Q$item\E$/i,@allemails)) { |
push(@allemails,$item); |
push(@allemails,$item); |
} |
} |
} |
} |
Line 727 sub reset_passwd {
|
Line 727 sub reset_passwd {
|
'<p class="LC_warning">' |
'<p class="LC_warning">' |
.&mt('Please enter a password that you have not used recently.') |
.&mt('Please enter a password that you have not used recently.') |
.'</p>' |
.'</p>' |
.&display_actions($contact_email,$domdesc) |
.&display_actions($contact_email,$domdesc,$token) |
); |
); |
} else { |
} else { |
$r->print(&generic_failure_msg($contact_name,$contact_email)); |
$r->print(&generic_failure_msg($contact_name,$contact_email)); |
Line 824 sub create_passwd {
|
Line 824 sub create_passwd {
|
} |
} |
|
|
sub display_actions { |
sub display_actions { |
my ($contact_email, $domdesc) = @_; |
my ($contact_email,$domdesc,$token) = @_; |
|
my $url = '/adm/resetpw'; |
|
if ($token) { |
|
$url .= '?token='.&escape($token); |
|
} |
my @msg = (&mt('[_1]Go back[_2] and try again', |
my @msg = (&mt('[_1]Go back[_2] and try again', |
'<a href="javascript:history.go(-1)">','</a>')); |
'<a href="'.$url.'">','</a>')); |
my $msg2 = ''; |
my $msg2 = ''; |
if ($contact_email ne '') { |
if ($contact_email ne '') { |
my $escuri = &HTML::Entities::encode('/adm/resetpw','&<>"'); |
my $escuri = &HTML::Entities::encode('/adm/resetpw','&<>"'); |