From 96202cfa048a75029e5e2487094679de4c93f270 Mon Sep 17 00:00:00 2001 From: Charles Farmer Date: Fri, 11 May 2018 16:27:39 -0400 Subject: [PATCH] Bug 18821 - (follow-up) adds POD to track_login_for_session, removes tab in Auth.t --- C4/Auth.pm | 11 +++++++++++ t/db_dependent/Auth.t | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/C4/Auth.pm b/C4/Auth.pm index 614cb0a..00e92cc 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -2076,6 +2076,17 @@ sub getborrowernumber { return 0; } +=head2 track_login_for_session + + track_login_for_session( $userid, $session ); + +C<$userid> the userid of the member +C<$session> the CGI::Session object used to store the session's state. + +Wraps the call to $patron->track_login, the method used to update borrowers.lastseen. + +=cut + sub track_login_for_session { my ( $userid, $session ) = @_; diff --git a/t/db_dependent/Auth.t b/t/db_dependent/Auth.t index cf80b50..a9b5b17 100644 --- a/t/db_dependent/Auth.t +++ b/t/db_dependent/Auth.t @@ -94,7 +94,7 @@ subtest 'track_login_for_session() tests' => sub { $patron->_result()->discard_changes(); isnt( $patron->lastseen, undef, 'Patron should have last seen set when TrackLastPatronActivity = 1' ); - sleep(1); # We need to wait a tiny bit to make sure the timestamp will be different + sleep(1); # We need to wait a tiny bit to make sure the timestamp will be different my $last_seen = $patron->lastseen; C4::Auth::track_login_for_session( $userid, $session ); $patron->_result()->discard_changes(); -- 2.7.4