Lines 294-315
sub import_patrons {
Link Here
|
294 |
try { |
294 |
try { |
295 |
$patron->set_password({ password => $borrower{password} }); |
295 |
$patron->set_password({ password => $borrower{password} }); |
296 |
} |
296 |
} |
297 |
catch { |
297 |
catch { |
298 |
if ( $_->isa('Koha::Exceptions::Password::TooShort') ) { |
298 |
if ( $_->isa('Koha::Exceptions::Password::TooShort') ) { |
299 |
push @errors, { passwd_too_short => 1, borrowernumber => $borrowernumber, length => $_->{length}, min_length => $_->{min_length} }; |
299 |
push @errors, { passwd_too_short => 1, borrowernumber => $borrowernumber, length => $_->{length}, min_length => $_->{min_length} }; |
300 |
} |
300 |
} |
301 |
elsif ( $_->isa('Koha::Exceptions::Password::WhitespaceCharacters') ) { |
301 |
elsif ( $_->isa('Koha::Exceptions::Password::WhitespaceCharacters') ) { |
302 |
push @errors, { passwd_whitespace => 1, borrowernumber => $borrowernumber } ; |
302 |
push @errors, { passwd_whitespace => 1, borrowernumber => $borrowernumber } ; |
303 |
} |
303 |
} |
304 |
elsif ( $_->isa('Koha::Exceptions::Password::TooWeak') ) { |
304 |
elsif ( $_->isa('Koha::Exceptions::Password::TooWeak') ) { |
305 |
push @errors, { passwd_too_weak => 1, borrowernumber => $borrowernumber } ; |
305 |
push @errors, { passwd_too_weak => 1, borrowernumber => $borrowernumber } ; |
306 |
} |
306 |
} |
307 |
elsif ( $_->isa('Koha::Exceptions::Password::Plugin') ) { |
307 |
elsif ( $_->isa('Koha::Exceptions::Password::Plugin') ) { |
308 |
push @errors, { passwd_plugin_err => 1, borrowernumber => $borrowernumber } ; |
308 |
push @errors, { passwd_plugin_err => 1, borrowernumber => $borrowernumber } ; |
309 |
} |
309 |
} |
310 |
else { |
310 |
else { |
311 |
push @errors, { passwd_unknown_err => 1, borrowernumber => $borrowernumber } ; |
311 |
push @errors, { passwd_unknown_err => 1, borrowernumber => $borrowernumber } ; |
312 |
} |
312 |
} |
313 |
} |
313 |
} |
314 |
} |
314 |
} |
315 |
if ($extended) { |
315 |
if ($extended) { |