From 51c3697f8f225a8f568fe33f6b7502bd05b37087 Mon Sep 17 00:00:00 2001 From: David Kuhn Date: Tue, 6 Jun 2017 09:38:07 -0700 Subject: [PATCH] Added the code from bug 17616, which allows patron to also use their card number as a login id since there were merge conflicts with that patch. https://bugs.koha-community.org/show_bug.cgi?id=16711 --- 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