[Koha-bugs] [Bug 24379] Borrowers Login Attempts is NULL

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Jan 8 22:41:42 CET 2020


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

--- Comment #1 from Nick Clemens <nick at bywatersolutions.com> ---
Created attachment 97058
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=97058&action=edit
Bug 24379: Make login_attempts not nullable

While the column defaults to 0 in Koha::Object->store we set to NULL if
NULLABLE

When trying to reset a patrons password we check that the account is not
administratively locked:
login_attempts != -1

This query does not return rows where login_attempts IS NULL. It will return
accounts where login_attempts = 0

Let's default to 0 like we intend

To test:
1 - Create a new patron
2 - Note their login_attempts is NULL
    SELECT login_attempts FROM borrowers ORDER BY borrowernumber DESC LIMIT 1
3 - Enable  OpacResetPassword
4 - Attempt to reset password before logging in, you cannot
5 - Apply patch, updatedatabase, restart_all, update schema
6 - Create another patron
7 - Their login attempts should be 0
8 - Attempt to reset password, it works!

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


More information about the Koha-bugs mailing list