Bugzilla – Attachment 64066 Details for
Bug 18616
The "Add forgot password link to OPAC" should allow patrons to use their library card number in addition to username
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18616 - The "Add forgot password link to OPAC" should allow patrons to use their library card number in addition to username
Bug-18616---The-Add-forgot-password-link-to-OPAC-s.patch (text/plain), 2.20 KB, created by
Marc Véron
on 2017-06-06 19:29:34 UTC
(
hide
)
Description:
Bug 18616 - The "Add forgot password link to OPAC" should allow patrons to use their library card number in addition to username
Filename:
MIME Type:
Creator:
Marc Véron
Created:
2017-06-06 19:29:34 UTC
Size:
2.20 KB
patch
obsolete
>From e2c49b77ac34aff7b1487d9deb96240faef61d8e Mon Sep 17 00:00:00 2001 >From: David Kuhn <techservspec@gmail.com> >Date: Tue, 6 Jun 2017 09:38:07 -0700 >Subject: [PATCH] Bug 18616 - The "Add forgot password link to OPAC" should > allow patrons to use their library card number in addition to username >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Allow patrons to enter either their library card number or user name in the "Log in" box for password recovery. > >Most patrons at our library use their card number to log in and are unaware of what their userid is. However there are some who have set a > >customized userid and would prefer to use that. This patch would allow either to be entered for password recovery. > >To test: >1. Enable the password recovery feature. >2. In the OPAC, click on "Forgot you password?" link and enter a valid library card number. >3. The error message "No account found with the provided information" appears. >4. Apply the patch. >5. Repeat step 2. The recovery email is now sent. > >Note: Moved patch from 16711 back here and re-tested. >Signed-off-by: Marc Véron <veron@veron.ch> >--- > opac/opac-password-recovery.pl | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > >diff --git a/opac/opac-password-recovery.pl b/opac/opac-password-recovery.pl >index 0a35e78..e2dac5d 100755 >--- a/opac/opac-password-recovery.pl >+++ b/opac/opac-password-recovery.pl >@@ -58,10 +58,10 @@ if ( $query->param('sendEmail') || $query->param('resendEmail') ) { > my $borrower; > my $search_results = []; > >- # Find the borrower by his userid or email >+ # Find the borrower by userid, card number, or email > if ($username) { >- $search_results = [ Koha::Patrons->search( { userid => $username } ) ]; >- $resultCount = Koha::Patrons->search( { userid => $username } ) -> count >+ $search_results = [ Koha::Patrons->search( { -or => { userid => $username, cardnumber => $username } } ) ]; >+ $resultCount = Koha::Patrons->search( { -or => { userid => $username, cardnumber => $username } } ) -> count > } > elsif ($email) { > $search_results = [ Koha::Patrons->search( { -or => { email => $email, emailpro => $email, B_email => $email } } ) ]; >-- >2.1.4
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 18616
:
63855
|
63881
|
63882
|
63883
|
64066
|
64608