From 861a191cd999bd2e559d697d98627c3543a765d7 Mon Sep 17 00:00:00 2001 From: Srdjan Date: Wed, 30 May 2012 13:38:35 +1200 Subject: [PATCH] Bug 8039: Try userid if cardnumber borrower search fails in SIP Signed-off-by: Kyle M Hall Signed-off-by: Paul Poulain Signed-off-by: Jared Camins-Esakov --- C4/SIP/ILS/Patron.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/C4/SIP/ILS/Patron.pm b/C4/SIP/ILS/Patron.pm index 69389eb28c..d9447260dc 100644 --- a/C4/SIP/ILS/Patron.pm +++ b/C4/SIP/ILS/Patron.pm @@ -31,13 +31,13 @@ sub new { my ($class, $patron_id) = @_; my $type = ref($class) || $class; my $self; - $kp = GetMember(cardnumber=>$patron_id); + $kp = GetMember(cardnumber=>$patron_id) || GetMember(userid=>$patron_id); $debug and warn "new Patron (GetMember): " . Dumper($kp); unless (defined $kp) { syslog("LOG_DEBUG", "new ILS::Patron(%s): no such patron", $patron_id); return; } - $kp = GetMemberDetails(undef,$patron_id); + $kp = GetMemberDetails($kp->{borrowernumber}); $debug and warn "new Patron (GetMemberDetails): " . Dumper($kp); my $pw = $kp->{password}; ### FIXME - md5hash -- deal with . my $flags = $kp->{flags}; # or warn "Warning: No flags from patron object for '$patron_id'"; -- 2.39.5