Bugzilla – Attachment 183765 Details for
Bug 40275
Add Koha::Patrons->find_by_identifier()
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40275: Implement find_by_identifier for check_cookie_auth
Bug-40275-Implement-findbyidentifier-for-checkcook.patch (text/plain), 1.25 KB, created by
Kyle M Hall (khall)
on 2025-07-03 13:25:22 UTC
(
hide
)
Description:
Bug 40275: Implement find_by_identifier for check_cookie_auth
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2025-07-03 13:25:22 UTC
Size:
1.25 KB
patch
obsolete
>From cfcc7ee2a2ce68b00d7b886afc252230462264b7 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Thu, 3 Jul 2025 09:23:54 -0400 >Subject: [PATCH] Bug 40275: Implement find_by_identifier for check_cookie_auth > >Test Plan: >1) prove t/db_dependent/Auth.t >--- > C4/Auth.pm | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > >diff --git a/C4/Auth.pm b/C4/Auth.pm >index 069edd42116..fe6e4c0f2e0 100644 >--- a/C4/Auth.pm >+++ b/C4/Auth.pm >@@ -1942,7 +1942,7 @@ sub check_cookie_auth { > > } elsif ($userid) { > $session->param( 'lasttime', time() ); >- my $patron = Koha::Patrons->find( { userid => $userid } ); >+ my $patron = Koha::Patrons->find_by_identifier($userid); > > # If the user modify their own userid > # Better than 500 but we could do better >@@ -1952,8 +1952,6 @@ sub check_cookie_auth { > return ( "expired", undef ); > } > >- $patron = Koha::Patrons->find( { cardnumber => $userid } ) >- unless $patron; > return ( "password_expired", undef ) if $patron->password_expired; > my $flags = defined($flagsrequired) ? haspermission( $userid, $flagsrequired ) : 1; > if ($flags) { >-- >2.39.5 (Apple Git-154)
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 40275
:
183647
|
183648
|
183649
|
183659
|
183660
|
183661
|
183761
|
183762
|
183763
|
183764
| 183765