Bugzilla – Attachment 89159 Details for
Bug 21533
Do not allow password recovery for administrative locked patrons (see 21336)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21533: Do not allow password recovery for administrative locked patrons
Bug-21533-Do-not-allow-password-recovery-for-admin.patch (text/plain), 2.13 KB, created by
Martin Renvoize (ashimema)
on 2019-05-01 09:21:47 UTC
(
hide
)
Description:
Bug 21533: Do not allow password recovery for administrative locked patrons
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2019-05-01 09:21:47 UTC
Size:
2.13 KB
patch
obsolete
>From ffa2ebe9599d0d8dae833a59a1f4917e16f62b43 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Wed, 10 Oct 2018 14:49:02 +0200 >Subject: [PATCH] Bug 21533: Do not allow password recovery for administrative > locked patrons > >Depends on bug 21336 for the ADMINISTRATIVE_LOCKOUT constant. > >This is a bit lazy solution (but good enough): The account will not be found >when recovering the password. The user should contact the library. Since >the library chose to lock the account, that seems appropriate. > >Test plan: >Select a borrower and set login_attempts to -1. Via mysql command line or >with Koha::Patrons->find(borrowernumber)->lock. >Enable password recovery. >Try to recover password from OPAC. You should fail with 'Not found, contact >the library'. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > opac/opac-password-recovery.pl | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/opac/opac-password-recovery.pl b/opac/opac-password-recovery.pl >index 5cc6bd36f3..a695165b56 100755 >--- a/opac/opac-password-recovery.pl >+++ b/opac/opac-password-recovery.pl >@@ -57,10 +57,10 @@ if ( $query->param('sendEmail') || $query->param('resendEmail') ) { > > # Find the borrower by userid, card number, or email > if ($username) { >- $search_results = Koha::Patrons->search( { -or => { userid => $username, cardnumber => $username } } ); >+ $search_results = Koha::Patrons->search( { -or => { userid => $username, cardnumber => $username }, login_attempts => { '!=', Koha::Patron::ADMINISTRATIVE_LOCKOUT } } ); > } > elsif ($email) { >- $search_results = Koha::Patrons->search( { -or => { email => $email, emailpro => $email, B_email => $email } } ); >+ $search_results = Koha::Patrons->search( { -or => { email => $email, emailpro => $email, B_email => $email }, login_attempts => { '!=', Koha::Patron::ADMINISTRATIVE_LOCKOUT } } ); > } > > if ( !defined $search_results || $search_results->count < 1) { >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 21533
:
80348
|
88904
|
88967
| 89159