From a2a28e6b58d6357e0dc6be35fd3b7ed69b88d806 Mon Sep 17 00:00:00 2001 From: Sam Lau Date: Mon, 17 Jun 2024 19:25:34 +0000 Subject: [PATCH] Bug 37104: (Follow up) Restructure checkpw code --- C4/Auth.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/C4/Auth.pm b/C4/Auth.pm index ab6827f615..9158c273c6 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -2058,10 +2058,10 @@ sub checkpw { if ($patron) { if ($passwd_ok) { $patron->update( { login_attempts => 0 } ); - if ( $patron->password_expired ) { - @return = ( -2, $patron ); - } if ( $patron->borrowernumber eq $anonymous_patron ) { + @return = ( -3, $patron ); + } + elsif ( $patron->password_expired ) { @return = ( -2, $patron ); } } elsif ( !$patron->account_locked ) { -- 2.39.2