From 877b24a8e0ce48ecd21a71050d7664e7b002a5e9 Mon Sep 17 00:00:00 2001 From: Fridolin Somers Date: Mon, 29 Jul 2024 16:33:41 +0200 Subject: [PATCH] Bug 25947: Improve locked account message When using system preference 'FailedLoginAttempts', a patron's account is blocked after X many failed login attempts on the OPAC. This patch adds, like for "Patron's card has expired" message : * a message "Patron's account has been locked (due to X failed login attempts)" on the patron details and circulation pages * a link to change password Links are only displayed if libarian has permission to edit patrons. For administrative lock, only a message is displayed : "Patron's account has been administratively locked" To test: 1. Change system preference 'FailedLoginAttempts' to a small number, like 2 2. Go to a patron's account and copy their username (while you're there, change the password and add some fines, too) 3. In the OPAC, try to log in with the username and a wrong password 3 times 4. Go back to the patron's account in the staff interface 5. Note that there is a message : "Patron's account has been locked (due to 3 failed login attempts)" 6. Click on "Change password", you go to change password page --- .../prog/en/includes/patron_messages.inc | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc index 1c32d87..0888251 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc @@ -5,7 +5,7 @@ [% SET return_claims = patron.return_claims %] [% SET logged_in_branchcode = Branches.GetLoggedInBranchcode() %] -[% IF ( has_modifications || warndeparture || returnbeforeexpiry || expired || patron.gonenoaddress || patron.lost || userdebarred || odues || ( return_claims.count > ClaimReturnedWarningThreshold ) || age_limitations || limited_category || charges || charges_guarantors_guarantees || charges_guarantees || credits ) %] +[% IF ( has_modifications || warndeparture || returnbeforeexpiry || expired || patron.gonenoaddress || patron.lost || userdebarred || odues || ( return_claims.count > ClaimReturnedWarningThreshold ) || age_limitations || limited_category || charges || charges_guarantors_guarantees || charges_guarantees || credits || patron.account_locked ) %]

Attention