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

(-)a/C4/Auth.pm (+3 lines)
Lines 802-807 sub checkauth { Link Here
802
    my $q_userid = $query->param('userid') // '';
802
    my $q_userid = $query->param('userid') // '';
803
803
804
    my $session;
804
    my $session;
805
    print STDERR "Auth 1\n";
805
806
806
    # Basic authentication is incompatible with the use of Shibboleth,
807
    # Basic authentication is incompatible with the use of Shibboleth,
807
    # as Shibboleth may return REMOTE_USER as a Shibboleth attribute,
808
    # as Shibboleth may return REMOTE_USER as a Shibboleth attribute,
Lines 828-833 sub checkauth { Link Here
828
    }
829
    }
829
    elsif ( $sessionID = $query->cookie("CGISESSID") )
830
    elsif ( $sessionID = $query->cookie("CGISESSID") )
830
    {    # assignment, not comparison
831
    {    # assignment, not comparison
832
        print STDERR "Auth 2\n";
831
        $session = get_session($sessionID);
833
        $session = get_session($sessionID);
832
        C4::Context->_new_userenv($sessionID);
834
        C4::Context->_new_userenv($sessionID);
833
        my ( $ip, $lasttime, $sessiontype );
835
        my ( $ip, $lasttime, $sessiontype );
Lines 1221-1226 sub checkauth { Link Here
1221
        if ( $userid ) {
1223
        if ( $userid ) {
1222
            # track_login also depends on pref TrackLastPatronActivity
1224
            # track_login also depends on pref TrackLastPatronActivity
1223
            my $patron = Koha::Patrons->find({ userid => $userid });
1225
            my $patron = Koha::Patrons->find({ userid => $userid });
1226
            print STDERR "Auth 3: $userid\n";
1224
            $patron->track_login( { session => $session } ) if $patron;
1227
            $patron->track_login( { session => $session } ) if $patron;
1225
        }
1228
        }
1226
1229
(-)a/Koha/Patron.pm (-1 / +5 lines)
Lines 404-418 sub has_overdues { Link Here
404
404
405
sub track_login {
405
sub track_login {
406
    my ( $self, $params ) = @_;
406
    my ( $self, $params ) = @_;
407
    print STDERR "Patron 1\n";
407
    my $session = $params->{session};
408
    my $session = $params->{session};
408
409
409
    return unless C4::Context->preference('TrackLastPatronActivity') || $params->{force};
410
    return unless C4::Context->preference('TrackLastPatronActivity') || $params->{force};
410
411
412
    print STDERR "Patron 2\n";
411
    if ( $session ) {
413
    if ( $session ) {
414
        print STDERR "Patron 3\n";
412
        return if $session->param('tracked_for_session') && !$params->{force};
415
        return if $session->param('tracked_for_session') && !$params->{force};
416
        print STDERR "Patron 4\n";
413
        $session->param('tracked_for_session', 1);
417
        $session->param('tracked_for_session', 1);
414
    }
418
    }
415
419
420
    print STDERR "Patron 5\n";
416
    $self->lastseen( dt_from_string() )->store;
421
    $self->lastseen( dt_from_string() )->store;
417
}
422
}
418
423
419
- 

Return to bug 18821