Bug 21336: Do not increase login_attempts after locking
[koha-equinox.git] / C4 / Auth.pm
index 9057c4f..5a0df07 100644 (file)
@@ -1851,7 +1851,7 @@ sub checkpw {
     if( $patron ) {
         if ( $passwd_ok ) {
             $patron->update({ login_attempts => 0 });
-        } else {
+        } elsif( !$patron->account_locked ) {
             $patron->update({ login_attempts => $patron->login_attempts + 1 });
         }
     }