version 1.36, 2013/08/17 00:34:29
|
version 1.37, 2016/01/27 00:24:09
|
Line 116 sub handler {
|
Line 116 sub handler {
|
my $authtype = &Apache::lonnet::queryauthenticate($uname,$udom); |
my $authtype = &Apache::lonnet::queryauthenticate($uname,$udom); |
if ($authtype =~ /^internal/) { |
if ($authtype =~ /^internal/) { |
my $useremail = $env{'form.useremail'}; |
my $useremail = $env{'form.useremail'}; |
if ($useremail !~ /^[^\@]+\@[^\@]+\.[^\@\.]+$/) { |
my ($blocked,$blocktext) = |
$output = &invalid_state('baduseremail',$domdesc, |
&Apache::loncommon::blocking_status('passwd',$uname,$udom); |
$contact_name,$contact_email); |
if ($blocked) { |
|
$output = '<p class="LC_warning">'.$blocktext.'</p>' |
|
.&display_actions($contact_email,$domdesc); |
|
} elsif ($useremail !~ /^[^\@]+\@[^\@]+\.[^\@\.]+$/) { |
|
$output = &invalid_state('baduseremail',$domdesc, |
|
$contact_name,$contact_email); |
} else { |
} else { |
my %userinfo = |
my %userinfo = |
&Apache::lonnet::get('environment',\@emailtypes, |
&Apache::lonnet::get('environment',\@emailtypes, |
Line 310 sub reset_passwd {
|
Line 315 sub reset_passwd {
|
($data{'email'} =~ /^[^\@]+\@[^\@]+\.[^\@\.]+$/) && |
($data{'email'} =~ /^[^\@]+\@[^\@]+\.[^\@\.]+$/) && |
($data{'temppasswd'} =~/^\w+$/)) { |
($data{'temppasswd'} =~/^\w+$/)) { |
my $reqtime = &Apache::lonlocal::locallocaltime($data{'time'}); |
my $reqtime = &Apache::lonlocal::locallocaltime($data{'time'}); |
if ($now - $data{'time'} < 7200) { |
my ($blocked,$blocktext) = |
|
&Apache::loncommon::blocking_status('passwd',$data{'username'},$data{'domain'}); |
|
if ($blocked) { |
|
$msg = '<p class="LC_warning">'.$blocktext.'</p>'; |
|
return $msg; |
|
} elsif ($now - $data{'time'} < 7200) { |
if ($env{'form.action'} eq 'verify_and_change_pass') { |
if ($env{'form.action'} eq 'verify_and_change_pass') { |
unless (($env{'form.uname'} eq $data{'username'}) && ($env{'form.udom'} eq $data{'domain'}) && ($env{'form.email'} eq $data{'email'})) { |
unless (($env{'form.uname'} eq $data{'username'}) && ($env{'form.udom'} eq $data{'domain'}) && ($env{'form.email'} eq $data{'email'})) { |
$msg = &generic_failure_msg($contact_name,$contact_email); |
$msg = &generic_failure_msg($contact_name,$contact_email); |