More corrections to fix Bug 2649, "minPasswordLength Sys Pref does nothing." Previous patch included typo copied from member-password.pl. Both are corrected now.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
This commit is contained in:
parent
9041930077
commit
2cf0eeedb6
|
|
@ -26,13 +26,13 @@
|
|||
<input type="hidden" name="borrowernumber" id="borrowernumber" value="<!-- TMPL_VAR NAME="borrowernumber" -->" />
|
||||
<!-- TMPL_IF NAME="errormsg" -->
|
||||
<!-- TMPL_IF NAME="BADUSERID" -->
|
||||
<p class="warning">You have entered a User ID that already exists. Please choose another one.</p>
|
||||
<div class="dialog alert">You have entered a User ID that already exists. Please choose another one.</div>
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- TMPL_IF NAME="SHORTPASSWORD" -->
|
||||
<p class="warning">The Password entered is too short.</p>
|
||||
<div class="dialog alert"><strong>The password entered is too short</strong>. Password must be at least <!-- TMPL_VAR NAME="minPasswordLength" --> characters.</div>
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- TMPL_IF NAME="NOPERMISSION" -->
|
||||
<p class="warning">You do not have permission to edit this member's login information.</p>
|
||||
<div class="dialog alert">You do not have permission to edit this patron's login information.</div>
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- /TMPL_IF -->
|
||||
|
||||
|
|
|
|||
|
|
@ -828,7 +828,7 @@
|
|||
<!-- /TMPL_IF -->
|
||||
<!--/TMPL_IF-->
|
||||
<!--/TMPL_IF-->
|
||||
<!-- TMPL_IF NAME="mandatorypassword" --><span class="required">Required</span><!-- /TMPL_IF -->
|
||||
<!-- TMPL_IF NAME="mandatorypassword" --><span class="required">Required</span><!-- /TMPL_IF --><!-- TMPL_IF NAME="ERROR_short_password" --><span class="required">Password is too short</span><!-- /TMPL_IF -->
|
||||
<!-- TMPL_IF NAME="minPasswordLength" --><div class="hint">Minimum password length: <!-- TMPL_VAR NAME="minPasswordLength" --></div><!-- /TMPL_IF -->
|
||||
</li></ol>
|
||||
</fieldset>
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ if(( $member ne $loggedinuser ) && ($bor->{'category_type'} eq 'S' ) ) {
|
|||
}
|
||||
my $newpassword = $input->param('newpassword');
|
||||
my $minpw = C4::Context->preference('minPasswordLength');
|
||||
$errormsg = 'SHORTPASSWORD' if( $newpassword && $minpw & (length($newpassword) < $minpw ) );
|
||||
$errormsg = 'SHORTPASSWORD' if( $newpassword && $minpw && (length($newpassword) < $minpw ) );
|
||||
|
||||
if ( $newpassword && ! $errormsg ) {
|
||||
my $digest=md5_base64($input->param('newpassword'));
|
||||
|
|
|
|||
|
|
@ -217,7 +217,7 @@ if ($op eq 'save' || $op eq 'insert'){
|
|||
}
|
||||
|
||||
my $password = $input->param('password');
|
||||
push @errors, "ERROR_short_password" if( $password && $minpw & (length($password) < $minpw ) );
|
||||
push @errors, "ERROR_short_password" if( $password && $minpw && (length($password) < $minpw ) );
|
||||
|
||||
if (C4::Context->preference('ExtendedPatronAttributes')) {
|
||||
$extended_patron_attributes = parse_extended_patron_attributes($input);
|
||||
|
|
|
|||
Loading…
Reference in New Issue