Lines 148-155
otherwise return $is_valid == 0 and $error will contain the error ('too_short' o
Link Here
|
148 |
|
148 |
|
149 |
sub is_password_valid { |
149 |
sub is_password_valid { |
150 |
my ($password) = @_; |
150 |
my ($password) = @_; |
151 |
my $minPasswordLength = C4::Context->preference('minPasswordLength'); |
151 |
my $minPasswordLength = C4::Context->preference('minPasswordLength') || 0; |
152 |
$minPasswordLength = 3 if not $minPasswordLength or $minPasswordLength < 3; |
152 |
|
|
|
153 |
if ( C4::Context->preference('RequireStrongPassword') ) { |
154 |
$minPasswordLength = 3 if $minPasswordLength < 3; |
155 |
} |
156 |
|
153 |
if ( length($password) < $minPasswordLength ) { |
157 |
if ( length($password) < $minPasswordLength ) { |
154 |
return ( 0, 'too_short' ); |
158 |
return ( 0, 'too_short' ); |
155 |
} |
159 |
} |
156 |
- |
|
|