Bugzilla – Attachment 64661 Details for
Bug 17554
Move GetBorrowersWithEmail to Koha::Patron
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17554: (followup) Shibboleth check should use ->find too
Bug-17554-followup-Shibboleth-check-should-use--fi.patch (text/plain), 1.46 KB, created by
Tomás Cohen Arazi (tcohen)
on 2017-06-26 18:27:39 UTC
(
hide
)
Description:
Bug 17554: (followup) Shibboleth check should use ->find too
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2017-06-26 18:27:39 UTC
Size:
1.46 KB
patch
obsolete
>From 28554c1a70bab65950960e1596a610772df8f064 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Mon, 26 Jun 2017 15:25:19 -0300 >Subject: [PATCH] Bug 17554: (followup) Shibboleth check should use ->find too > >There was a remaining use of C4::Members::GetBorrowersWithEmail in Auth.pm. > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > C4/Auth.pm | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > >diff --git a/C4/Auth.pm b/C4/Auth.pm >index 549ece9..e7b0895 100644 >--- a/C4/Auth.pm >+++ b/C4/Auth.pm >@@ -965,12 +965,12 @@ sub checkauth { > # doesn't have a userid. So if there is none, we pass along the > # borrower number, and the bits of code that need to know the user > # ID will have to be smart enough to handle that. >- require C4::Members; >- my @users_info = C4::Members::GetBorrowersWithEmail($value); >- if (@users_info) { >+ my $patrons = Koha::Patrons->search({ email => $value }); >+ if ($patrons->count) { > > # First the userid, then the borrowernum >- $value = $users_info[0][1] || $users_info[0][0]; >+ my $patron = $patrons->next; >+ $value = $patron->userid || $patron->borrowernumber; > } else { > undef $value; > } >-- >2.7.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 17554
:
57207
|
57208
|
58184
|
58486
|
62956
|
64660
| 64661