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

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

Return to bug 15504