Bug 37104: (Follow-up) Checks for unitialized value of 'anonymous_patron' system pref

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
JD Amended patch: replace '==' with 'eq' for consistency with other
occurrences.
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Sam Lau 2024-07-08 14:50:30 +00:00 committed by Katrin Fischer
parent 4c5425bd2f
commit 9dbd82a1a4
Signed by: kfischer
GPG key ID: 0EF6E2C03357A834

View file

@ -2062,7 +2062,7 @@ sub checkpw {
@return = (); @return = ();
} elsif ($passwd_ok) { } elsif ($passwd_ok) {
$patron->update( { login_attempts => 0 } ); $patron->update( { login_attempts => 0 } );
if ( $patron->borrowernumber eq $anonymous_patron ) { if ( defined($anonymous_patron) && ($patron->borrowernumber eq $anonymous_patron) ) {
@return = ( -3, $patron ); @return = ( -3, $patron );
} elsif ( $patron->password_expired ) { } elsif ( $patron->password_expired ) {
@return = ( -2, $patron ); @return = ( -2, $patron );