View | Details | Raw Unified | Return to bug 23473
Collapse All | Expand All

(-)a/Koha/Patrons/Import.pm (-1 / +21 lines)
Lines 21-26 use namespace::clean; Link Here
21
21
22
use Carp;
22
use Carp;
23
use Text::CSV;
23
use Text::CSV;
24
use Try::Tiny;
24
25
25
use C4::Members;
26
use C4::Members;
26
use C4::Members::Attributes qw(:all);
27
use C4::Members::Attributes qw(:all);
Lines 289-295 sub import_patrons { Link Here
289
                }
290
                }
290
            }
291
            }
291
            if ($overwrite_passwords){
292
            if ($overwrite_passwords){
292
                $patron->set_password({ password => $borrower{password} });
293
                try {
294
                    $patron->set_password({ password => $borrower{password} });
295
                }
296
				catch {
297
					if ( $_->isa('Koha::Exceptions::Password::TooShort') ) {
298
						push @errors, { passwd_too_short => 1, borrowernumber => $borrowernumber, length => $_->{length}, min_length => $_->{min_length} };
299
					}
300
					elsif ( $_->isa('Koha::Exceptions::Password::WhitespaceCharacters') ) {
301
						push @errors, { passwd_whitespace => 1, borrowernumber => $borrowernumber } ;
302
					}
303
					elsif ( $_->isa('Koha::Exceptions::Password::TooWeak') ) {
304
						push @errors, { passwd_too_weak => 1, borrowernumber => $borrowernumber } ;
305
					}
306
					elsif ( $_->isa('Koha::Exceptions::Password::Plugin') ) {
307
						push @errors, { passwd_plugin_err => 1, borrowernumber => $borrowernumber } ;
308
					}
309
					else {
310
						push @errors, { passwd_unknown_err => 1, borrowernumber => $borrowernumber } ;
311
					}
312
                }
293
            }
313
            }
294
            if ($extended) {
314
            if ($extended) {
295
                if ($ext_preserve) {
315
                if ($ext_preserve) {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/import_borrowers.tt (-1 / +25 lines)
Lines 115-120 Link Here
115
                            Userid [% e.userid | html %] is already used by another patron.
115
                            Userid [% e.userid | html %] is already used by another patron.
116
                        </li>
116
                        </li>
117
                    [% END %]
117
                    [% END %]
118
                    [% IF e.passwd_too_short %]
119
                        <li class="line_error">
120
                            Password is too short for patron with borrowernumber [% e.borrowernumber | html %]. Minimum length is [% e.min_length %], length is [% e.length %]
121
                        </li>
122
                    [% END %]
123
                    [% IF e.passwd_whitespace %]
124
                        <li class="line_error">
125
                            Password contains whitespace for patron with borrowernumber [% e.borrowernumber | html %].
126
                        </li>
127
                    [% END %]
128
                    [% IF e.passwd_too_weak %]
129
                        <li class="line_error">
130
                            Password is too weak for patron with borrowernumber [% e.borrowernumber | html %].
131
                        </li>
132
                    [% END %]
133
                    [% IF e.passwd_plugin_err %]
134
                        <li class="line_error">
135
                            Password plugin error for patron with borrowernumber [% e.borrowernumber | html %].
136
                        </li>
137
                    [% END %]
138
                    [% IF e.passwd_unknown_err %]
139
                        <li class="line_error">
140
                            Password error for patron with borrowernumber [% e.borrowernumber | html %].
141
                        </li>
142
                    [% END %]
118
                [% END %]
143
                [% END %]
119
            </ul>
144
            </ul>
120
        </div>
145
        </div>
121
- 

Return to bug 23473