Lines 167-173
sub import_patrons {
Link Here
|
167 |
if ( defined($matchpoint) && ( $matchpoint eq 'cardnumber' ) && ( $borrower{'cardnumber'} ) ) { |
167 |
if ( defined($matchpoint) && ( $matchpoint eq 'cardnumber' ) && ( $borrower{'cardnumber'} ) ) { |
168 |
$member = Koha::Patrons->find( { cardnumber => $borrower{'cardnumber'} } ); |
168 |
$member = Koha::Patrons->find( { cardnumber => $borrower{'cardnumber'} } ); |
169 |
} |
169 |
} |
170 |
elsif ( ($matchpoint eq 'userid') && ($borrower{'userid'}) ) { |
170 |
elsif ( defined($matchpoint) && ($matchpoint eq 'userid') && ($borrower{'userid'}) ) { |
171 |
$member = Koha::Patrons->find( { userid => $borrower{userid} } ); |
171 |
$member = Koha::Patrons->find( { userid => $borrower{userid} } ); |
172 |
} |
172 |
} |
173 |
elsif ($extended) { |
173 |
elsif ($extended) { |
Lines 201-207
sub import_patrons {
Link Here
|
201 |
} |
201 |
} |
202 |
|
202 |
|
203 |
# Check if the userid provided does not exist yet |
203 |
# Check if the userid provided does not exist yet |
204 |
if ( $matchpoint ne 'userid' and exists $borrower{userid} |
204 |
if ( defined($matchpoint) and $matchpoint ne 'userid' and exists $borrower{userid} |
205 |
and $borrower{userid} |
205 |
and $borrower{userid} |
206 |
and not Check_Userid( $borrower{userid}, $borrower{borrowernumber} ) ) { |
206 |
and not Check_Userid( $borrower{userid}, $borrower{borrowernumber} ) ) { |
207 |
push @errors, { duplicate_userid => 1, userid => $borrower{userid} }; |
207 |
push @errors, { duplicate_userid => 1, userid => $borrower{userid} }; |