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

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

Return to bug 15504