Lines 93-104
if ( defined $min ) {
Link Here
|
93 |
); |
93 |
); |
94 |
} |
94 |
} |
95 |
|
95 |
|
|
|
96 |
my $defaultCategory = Koha::Patron::Categories->find(C4::Context->preference('PatronSelfRegistrationDefaultCategory')); |
97 |
|
96 |
$template->param( |
98 |
$template->param( |
97 |
action => $action, |
99 |
action => $action, |
98 |
hidden => GetHiddenFields( $mandatory, $action ), |
100 |
hidden => GetHiddenFields( $mandatory, $action ), |
99 |
mandatory => $mandatory, |
101 |
mandatory => $mandatory, |
100 |
libraries => \@libraries, |
102 |
libraries => \@libraries, |
101 |
OPACPatronDetails => C4::Context->preference('OPACPatronDetails'), |
103 |
OPACPatronDetails => C4::Context->preference('OPACPatronDetails'), |
|
|
104 |
defaultCategory => $defaultCategory, |
102 |
); |
105 |
); |
103 |
|
106 |
|
104 |
my $attributes = ParsePatronAttributes($borrowernumber,$cgi); |
107 |
my $attributes = ParsePatronAttributes($borrowernumber,$cgi); |
Lines 476-482
sub CheckForInvalidFields {
Link Here
|
476 |
push( @invalidFields, "password_match" ); |
479 |
push( @invalidFields, "password_match" ); |
477 |
} |
480 |
} |
478 |
if ( $borrower->{'password'} ) { |
481 |
if ( $borrower->{'password'} ) { |
479 |
my ( $is_valid, $error ) = Koha::AuthUtils::is_password_valid( $borrower->{password}, Koha::Patron::Categories->find($borrower->{categorycode}) ); |
482 |
my ( $is_valid, $error ) = Koha::AuthUtils::is_password_valid( $borrower->{password}, Koha::Patron::Categories->find($borrower->{categorycode}||C4::Context->preference('PatronSelfRegistrationDefaultCategory')) ); |
480 |
unless ( $is_valid ) { |
483 |
unless ( $is_valid ) { |
481 |
push @invalidFields, 'password_too_short' if $error eq 'too_short'; |
484 |
push @invalidFields, 'password_too_short' if $error eq 'too_short'; |
482 |
push @invalidFields, 'password_too_weak' if $error eq 'too_weak'; |
485 |
push @invalidFields, 'password_too_weak' if $error eq 'too_weak'; |
483 |
- |
|
|