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

(-)a/C4/Auth.pm (-12 lines)
Lines 804-816 sub _version_check { Link Here
804
    }
804
    }
805
}
805
}
806
806
807
sub _session_log {
808
    (@_) or return 0;
809
    open my $fh, '>>', "/tmp/sessionlog" or warn "ERROR: Cannot append to /tmp/sessionlog";
810
    printf $fh join( "\n", @_ );
811
    close $fh;
812
}
813
814
sub _timeout_syspref {
807
sub _timeout_syspref {
815
    my $default_timeout = 600;
808
    my $default_timeout = 600;
816
    my $timeout = C4::Context->preference('timeout') || $default_timeout;
809
    my $timeout = C4::Context->preference('timeout') || $default_timeout;
Lines 953-959 sub checkauth { Link Here
953
            $session->flush;
946
            $session->flush;
954
            C4::Context->_unset_userenv($sessionID);
947
            C4::Context->_unset_userenv($sessionID);
955
948
956
            #_session_log(sprintf "%20s from %16s logged out at %30s (manually).\n", $userid,$ip,(strftime "%c",localtime));
957
            $sessionID = undef;
949
            $sessionID = undef;
958
            $userid    = undef;
950
            $userid    = undef;
959
951
Lines 976-982 sub checkauth { Link Here
976
            }
968
            }
977
            C4::Context->_unset_userenv($sessionID);
969
            C4::Context->_unset_userenv($sessionID);
978
970
979
            #_session_log(sprintf "%20s from %16s logged out at %30s (inactivity).\n", $userid,$ip,(strftime "%c",localtime));
980
            $userid    = undef;
971
            $userid    = undef;
981
            $sessionID = undef;
972
            $sessionID = undef;
982
        }
973
        }
Lines 990-996 sub checkauth { Link Here
990
            $session->flush;
981
            $session->flush;
991
            C4::Context->_unset_userenv($sessionID);
982
            C4::Context->_unset_userenv($sessionID);
992
983
993
            #_session_log(sprintf "%20s from %16s logged out at %30s (ip changed to %16s).\n", $userid,$ip,(strftime "%c",localtime), $info{'newip'});
994
            $sessionID = undef;
984
            $sessionID = undef;
995
            $userid    = undef;
985
            $userid    = undef;
996
        }
986
        }
Lines 1151-1157 sub checkauth { Link Here
1151
            # $return: 1 = valid user
1141
            # $return: 1 = valid user
1152
            if ($return) {
1142
            if ($return) {
1153
1143
1154
                #_session_log(sprintf "%20s from %16s logged in  at %30s.\n", $userid,$ENV{'REMOTE_ADDR'},(strftime '%c', localtime));
1155
                if ( $flags = haspermission( $userid, $flagsrequired ) ) {
1144
                if ( $flags = haspermission( $userid, $flagsrequired ) ) {
1156
                    $loggedin = 1;
1145
                    $loggedin = 1;
1157
                }
1146
                }
1158
- 

Return to bug 28571