Bug 28630: Add track_login_daily to ILSDI::AuthenticatePatron

This patch adds a call to track_login_daily for the AuthenticatePatron
method in ILSDI.

Many libraries use this ILSDI endpoint for electron book borrowing and
need to maintain the lastseen based on this type of lending.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Martin Renvoize 2021-06-25 09:50:50 +01:00 committed by Jonathan Druart
parent 2ddd899a99
commit 0f4bad73de
1 changed files with 2 additions and 0 deletions

View File

@ -397,6 +397,8 @@ sub AuthenticatePatron {
my $password = $cgi->param('password');
my ($status, $cardnumber, $userid) = C4::Auth::checkpw( C4::Context->dbh, $username, $password );
if ( $status ) {
# Track the login
C4::Auth::track_login_daily( $userid );
# Get the borrower
my $patron = Koha::Patrons->find( { userid => $userid } );
return { id => $patron->borrowernumber };