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

(-)a/Koha/Patron.pm (-1 / +1 lines)
Lines 1186-1192 sub update_lastseen { Link Here
1186
    return $self unless $tracked_activities->{$activity};
1186
    return $self unless $tracked_activities->{$activity};
1187
1187
1188
    my $cache     = Koha::Caches->get_instance();
1188
    my $cache     = Koha::Caches->get_instance();
1189
    my $cache_key = "track_login_" . $self->userid;
1189
    my $cache_key = "track_activity_" . $self->borrowernumber;
1190
    my $cached    = $cache->get_from_cache($cache_key);
1190
    my $cached    = $cache->get_from_cache($cache_key);
1191
    my $now       = dt_from_string();
1191
    my $now       = dt_from_string();
1192
    return if $cached && $cached eq $now->ymd;
1192
    return if $cached && $cached eq $now->ymd;
(-)a/t/db_dependent/Koha/Patron.t (-2 / +1 lines)
Lines 1964-1970 subtest 'update_lastseen tests' => sub { Link Here
1964
    $patron->store();
1964
    $patron->store();
1965
1965
1966
    my $cache     = Koha::Caches->get_instance();
1966
    my $cache     = Koha::Caches->get_instance();
1967
    my $cache_key = "track_login_" . $patron->userid;
1967
    my $cache_key = "track_activity_" . $patron->borrowernumber;
1968
    $cache->clear_from_cache($cache_key);
1968
    $cache->clear_from_cache($cache_key);
1969
1969
1970
    t::lib::Mocks::mock_preference( 'TrackLastPatronActivity',         '1' );
1970
    t::lib::Mocks::mock_preference( 'TrackLastPatronActivity',         '1' );
1971
- 

Return to bug 15504