Bugzilla – Attachment 158272 Details for
Bug 35231
Cannot logout from OPAC and not login afterwards
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35231: Resolve crash on unexisting patron in Auth
Bug-35231-Resolve-crash-on-unexisting-patron-in-Au.patch (text/plain), 1.33 KB, created by
Martin Renvoize
on 2023-11-02 16:42:54 UTC
(
hide
)
Description:
Bug 35231: Resolve crash on unexisting patron in Auth
Filename:
MIME Type:
Creator:
Martin Renvoize
Created:
2023-11-02 16:42:54 UTC
Size:
1.33 KB
patch
obsolete
>From 8b2e8aff0c1e4e298ee054af6f4b80ec0f25216b Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Thu, 2 Nov 2023 13:16:52 +0000 >Subject: [PATCH] Bug 35231: Resolve crash on unexisting patron in Auth > >Test plan: >Without this patch: >Logout from OPAC. Crash. >Try to login. Crash. > >With this patch: >Enable login in tracking triggers. Clear lastseen. >Flush memcache. >Login. Check lastseen. >Logout. >Login. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > C4/Auth.pm | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/C4/Auth.pm b/C4/Auth.pm >index a73d0c92b65..90c028b2701 100644 >--- a/C4/Auth.pm >+++ b/C4/Auth.pm >@@ -1318,8 +1318,8 @@ sub checkauth { > )); > } > >- my $patron = Koha::Patrons->find({ userid => $userid }); >- $patron->update_lastseen('login'); >+ my $patron = $userid ? Koha::Patrons->find({ userid => $userid }) : undef; >+ $patron->update_lastseen('login') if $patron; > > # In case, that this request was a login attempt, we want to prevent that users can repost the opac login > # request. We therefore redirect the user to the requested page again without the login parameters. >-- >2.41.0
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 35231
:
158253
|
158259
|
158260
|
158261
| 158272