From c873c5f438c5d9875b1861d2a0988705e0fd127d Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 7 Oct 2008 09:21:01 -0500 Subject: [PATCH] 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 --- .../prog/en/modules/members/member-password.tmpl | 6 +++--- .../prog/en/modules/members/memberentrygen.tmpl | 2 +- members/member-password.pl | 2 +- members/memberentry.pl | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member-password.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member-password.tmpl index 1d51ef8d97..cdd852d0d3 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member-password.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member-password.tmpl @@ -26,13 +26,13 @@ " /> -

You have entered a User ID that already exists. Please choose another one.

+
You have entered a User ID that already exists. Please choose another one.
-

The Password entered is too short.

+
The password entered is too short. Password must be at least characters.
-

You do not have permission to edit this member's login information.

+
You do not have permission to edit this patron's login information.
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tmpl index 60f3b95862..90140ae555 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tmpl @@ -828,7 +828,7 @@ - Required + RequiredPassword is too short
Minimum password length:
diff --git a/members/member-password.pl b/members/member-password.pl index 4845a0609f..f18db80637 100755 --- a/members/member-password.pl +++ b/members/member-password.pl @@ -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')); diff --git a/members/memberentry.pl b/members/memberentry.pl index 16fde6fe5d..a1a3f7fdcb 100755 --- a/members/memberentry.pl +++ b/members/memberentry.pl @@ -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); -- 2.39.5