Lines 22-27
use namespace::clean;
Link Here
|
22 |
use Carp; |
22 |
use Carp; |
23 |
use Text::CSV; |
23 |
use Text::CSV; |
24 |
use Encode qw( decode_utf8 ); |
24 |
use Encode qw( decode_utf8 ); |
|
|
25 |
use Try::Tiny; |
25 |
|
26 |
|
26 |
use C4::Members; |
27 |
use C4::Members; |
27 |
|
28 |
|
Lines 303-309
sub import_patrons {
Link Here
|
303 |
} |
304 |
} |
304 |
} |
305 |
} |
305 |
if ($overwrite_passwords){ |
306 |
if ($overwrite_passwords){ |
306 |
$patron->set_password({ password => $borrower{password} }); |
307 |
try { |
|
|
308 |
$patron->set_password({ password => $borrower{password} }); |
309 |
} |
310 |
catch { |
311 |
if ( $_->isa('Koha::Exceptions::Password::TooShort') ) { |
312 |
push @errors, { passwd_too_short => 1, borrowernumber => $borrowernumber, length => $_->{length}, min_length => $_->{min_length} }; |
313 |
} |
314 |
elsif ( $_->isa('Koha::Exceptions::Password::WhitespaceCharacters') ) { |
315 |
push @errors, { passwd_whitespace => 1, borrowernumber => $borrowernumber } ; |
316 |
} |
317 |
elsif ( $_->isa('Koha::Exceptions::Password::TooWeak') ) { |
318 |
push @errors, { passwd_too_weak => 1, borrowernumber => $borrowernumber } ; |
319 |
} |
320 |
elsif ( $_->isa('Koha::Exceptions::Password::Plugin') ) { |
321 |
push @errors, { passwd_plugin_err => 1, borrowernumber => $borrowernumber } ; |
322 |
} |
323 |
else { |
324 |
push @errors, { passwd_unknown_err => 1, borrowernumber => $borrowernumber } ; |
325 |
} |
326 |
} |
307 |
} |
327 |
} |
308 |
if ($extended) { |
328 |
if ($extended) { |
309 |
if ($ext_preserve) { |
329 |
if ($ext_preserve) { |