From 3d1d81014db886e35a18ee546c9a9e2dfb011ce9 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Tue, 11 Aug 2020 11:22:22 +0000 Subject: [PATCH] Bug 26191: Relocate track_login call in Auth.pm This is a leftover from bug 22543. Trivial move. Test plan: Do not apply this patch. Pick a user that has not yet logged in today. Only login via the opac and immediately check if borrowers.datelastseen did not change. Apply this patch, restart, flush etc. Only login via the opac and verify again rightaway (no further opac actions). Now datelastseen should have been changed already. Signed-off-by: Marcel de Rooy Signed-off-by: Martin Renvoize Signed-off-by: Jonathan Druart (cherry picked from commit b827acf53ffde71d787123095b8524ea6bd08fd6) Signed-off-by: Lucas Gass (cherry picked from commit f095fc1aeffaabd9d54f7df0378f226b0d2e0729) Signed-off-by: Aleisha Amohia --- C4/Auth.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/C4/Auth.pm b/C4/Auth.pm index e622f20586..ccdaebee9c 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -1226,6 +1226,8 @@ sub checkauth { ); } + track_login_daily( $userid ); + # 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. # See Post/Redirect/Get (PRG) design pattern: https://en.wikipedia.org/wiki/Post/Redirect/Get @@ -1238,8 +1240,6 @@ sub checkauth { exit; } - track_login_daily( $userid ); - return ( $userid, $cookie, $sessionID, $flags ); } -- 2.39.5