From b32b775ef5a1e2b9e22251d6234d358d5d103aba Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Thu, 2 Nov 2023 13:16:52 +0000 Subject: [PATCH] Bug 35231: Resolve crash on unexisting patron in Auth Content-Type: text/plain; charset=utf-8 Test plan: Without this patch. Logout from OPAC. Crash. Try to login. Crash. With this patch. Resolved. Signed-off-by: Marcel de Rooy --- C4/Auth.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Auth.pm b/C4/Auth.pm index a73d0c92b6..358d2601cc 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -1319,7 +1319,7 @@ sub checkauth { } my $patron = Koha::Patrons->find({ userid => $userid }); - $patron->update_lastseen('login'); + $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.30.2