version 1.201, 2019/07/23 13:58:53
|
version 1.205, 2020/02/10 17:12:54
|
Line 656 sub passwd_validation_js {
|
Line 656 sub passwd_validation_js {
|
my %passwdconf = &Apache::lonnet::get_passwdconf($domain); |
my %passwdconf = &Apache::lonnet::get_passwdconf($domain); |
my ($min,$max,@chars,$numrules,$intargjs,%alert); |
my ($min,$max,@chars,$numrules,$intargjs,%alert); |
$numrules = 0; |
$numrules = 0; |
|
$min = $Apache::lonnet::passwdmin; |
if (ref($passwdconf{'chars'}) eq 'ARRAY') { |
if (ref($passwdconf{'chars'}) eq 'ARRAY') { |
if ($passwdconf{'min'} =~ /^\d+$/) { |
if ($passwdconf{'min'} =~ /^\d+$/) { |
$min = $passwdconf{'min'}; |
if ($passwdconf{'min'} > $min) { |
$numrules ++; |
$min = $passwdconf{'min'}; |
|
} |
} |
} |
if ($passwdconf{'max'} =~ /^\d+$/) { |
if ($passwdconf{'max'} =~ /^\d+$/) { |
$max = $passwdconf{'max'}; |
$max = $passwdconf{'max'}; |
Line 669 sub passwd_validation_js {
|
Line 671 sub passwd_validation_js {
|
if (@chars) { |
if (@chars) { |
$numrules ++; |
$numrules ++; |
} |
} |
} else { |
} |
$min = 7; |
if ($min > 0) { |
$numrules ++; |
$numrules ++; |
} |
} |
if (($min ne '') || ($max ne '') || (@chars > 0)) { |
if (($min > 0) || ($max ne '') || (@chars > 0)) { |
my $alertmsg = &mt('Initial password did not satisfy requirement(s):').'\n\n'; |
my $alertmsg = &mt('Initial password did not satisfy requirement(s):').'\n\n'; |
if ($min) { |
if ($min) { |
$alert{'min'} = &mt('minimum [quant,_1,character]',$min).'\n'; |
$alert{'min'} = &mt('minimum [quant,_1,character]',$min).'\n'; |
Line 3667 END
|
Line 3669 END
|
setSections(formname,'$crstype'); |
setSections(formname,'$crstype'); |
if (seccheck == 'ok') { |
if (seccheck == 'ok') { |
opener.document.$callingform.newsecs.value = formname.sections.value; |
opener.document.$callingform.newsecs.value = formname.sections.value; |
|
} else { |
|
return; |
} |
} |
END |
END |
} else { |
} else { |
Line 4387 sub upfile_drop_add {
|
Line 4391 sub upfile_drop_add {
|
if ((defined($env{'form.intarg'})) && ($env{'form.intarg'})) { |
if ((defined($env{'form.intarg'})) && ($env{'form.intarg'})) { |
$genpwd=$env{'form.intarg'}; |
$genpwd=$env{'form.intarg'}; |
@genpwdfail = |
@genpwdfail = |
&Apache::loncommon::check_passwd_rules($domain,$genpwd); |
&Apache::loncommon::check_passwd_rules($domain,$genpwd); |
} |
} |
} elsif ($env{'form.login'} eq 'loc') { |
} elsif ($env{'form.login'} eq 'loc') { |
$amode='localauth'; |
$amode='localauth'; |
Line 5046 sub upfile_drop_add {
|
Line 5050 sub upfile_drop_add {
|
} |
} |
} |
} |
} |
} |
if (!$multiple) { |
} |
($userresult,$authresult,$roleresult,$idresult) = |
if (!$multiple) { |
&modifyuserrole($context,$setting, |
($userresult,$authresult,$roleresult,$idresult) = |
$changeauth,$cid,$userdomain,$username, |
&modifyuserrole($context,$setting, |
$id,$amode,$password,$fname, |
$changeauth,$cid,$userdomain,$username, |
$mname,$lname,$gen,$singlesec, |
$id,$amode,$password,$fname, |
$env{'form.forceid'},$desiredhost, |
$mname,$lname,$gen,$singlesec, |
$email,$role,$enddate,$startdate, |
$env{'form.forceid'},$desiredhost, |
$checkid,$inststatus); |
$email,$role,$enddate,$startdate, |
} |
$checkid,$inststatus); |
} |
} |
} |
} |
if ($multiple) { |
if ($multiple) { |