[Koha-bugs] [Bug 20348] New: SIP2 patron identification fails to use userid

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Mar 7 09:19:46 CET 2018


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20348

            Bug ID: 20348
           Summary: SIP2 patron identification fails to use userid
 Change sponsored?: ---
           Product: Koha
           Version: 17.11
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P5 - low
         Component: SIP2
          Assignee: koha-bugs at lists.koha-community.org
          Reporter: jose.i.martin.cuesta at gmail.com
        QA Contact: testopia at bugs.koha-community.org
                CC: colin.campbell at ptfs-europe.com

The following code in C4/SIP/ILS/Patron.pm:

    $kp = Koha::Patrons->find( { cardnumber => $patron_id } )
        or Koha::Patrons->find( { userid => $patron_id } );

should be (using || instead of or):

    $kp = Koha::Patrons->find( { cardnumber => $patron_id } )
        || Koha::Patrons->find( { userid => $patron_id } );

It will never try to match a patron by userid.
This is a bug according to Perl documentation here:
https://perldoc.perl.org/perlop.html#Logical-or-and-Exclusive-Or

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.


More information about the Koha-bugs mailing list