View | Details | Raw Unified | Return to bug 15504
Collapse All | Expand All

(-)a/C4/Auth.pm (-2 / +6 lines)
Lines 2358-2364 Wraps the call to $patron->track_login, the method used to update borrowers.last Link Here
2358
2358
2359
sub track_login_daily {
2359
sub track_login_daily {
2360
    my $userid = shift;
2360
    my $userid = shift;
2361
    return if !$userid || !C4::Context->preference('TrackLastPatronActivity');
2361
    my $activity = shift;
2362
    return if !$userid || !$activity || !C4::Context->preference('TrackLastPatronActivity');
2362
2363
2363
    my $cache     = Koha::Caches->get_instance();
2364
    my $cache     = Koha::Caches->get_instance();
2364
    my $cache_key = "track_login_" . $userid;
2365
    my $cache_key = "track_login_" . $userid;
Lines 2368-2373 sub track_login_daily { Link Here
2368
2369
2369
    my $patron = Koha::Patrons->find({ userid => $userid });
2370
    my $patron = Koha::Patrons->find({ userid => $userid });
2370
    return unless $patron;
2371
    return unless $patron;
2372
2373
    my $tracked_activities = { map { (lc $_, 1); } split /\s*\,\s*/, C4::Context->preference('TrackLastPatronActivityTriggers') };
2374
    return unless $tracked_activities->{$activity};
2375
2371
    $patron->track_login;
2376
    $patron->track_login;
2372
    $cache->set_in_cache( $cache_key, $today );
2377
    $cache->set_in_cache( $cache_key, $today );
2373
}
2378
}
2374
- 

Return to bug 15504