Lines 965-976
sub checkauth {
Link Here
|
965 |
# doesn't have a userid. So if there is none, we pass along the |
965 |
# doesn't have a userid. So if there is none, we pass along the |
966 |
# borrower number, and the bits of code that need to know the user |
966 |
# borrower number, and the bits of code that need to know the user |
967 |
# ID will have to be smart enough to handle that. |
967 |
# ID will have to be smart enough to handle that. |
968 |
require C4::Members; |
968 |
my $patrons = Koha::Patrons->search({ email => $value }); |
969 |
my @users_info = C4::Members::GetBorrowersWithEmail($value); |
969 |
if ($patrons->count) { |
970 |
if (@users_info) { |
|
|
971 |
|
970 |
|
972 |
# First the userid, then the borrowernum |
971 |
# First the userid, then the borrowernum |
973 |
$value = $users_info[0][1] || $users_info[0][0]; |
972 |
my $patron = $patrons->next; |
|
|
973 |
$value = $patron->userid || $patron->borrowernumber; |
974 |
} else { |
974 |
} else { |
975 |
undef $value; |
975 |
undef $value; |
976 |
} |
976 |
} |
977 |
- |
|
|