Lines 776-788
sub _version_check {
Link Here
|
776 |
} |
776 |
} |
777 |
} |
777 |
} |
778 |
|
778 |
|
779 |
sub _session_log { |
|
|
780 |
(@_) or return 0; |
781 |
open my $fh, '>>', "/tmp/sessionlog" or warn "ERROR: Cannot append to /tmp/sessionlog"; |
782 |
printf $fh join( "\n", @_ ); |
783 |
close $fh; |
784 |
} |
785 |
|
786 |
sub _timeout_syspref { |
779 |
sub _timeout_syspref { |
787 |
my $default_timeout = 600; |
780 |
my $default_timeout = 600; |
788 |
my $timeout = C4::Context->preference('timeout') || $default_timeout; |
781 |
my $timeout = C4::Context->preference('timeout') || $default_timeout; |
Lines 925-931
sub checkauth {
Link Here
|
925 |
$session->flush; |
918 |
$session->flush; |
926 |
C4::Context->_unset_userenv($sessionID); |
919 |
C4::Context->_unset_userenv($sessionID); |
927 |
|
920 |
|
928 |
#_session_log(sprintf "%20s from %16s logged out at %30s (manually).\n", $userid,$ip,(strftime "%c",localtime)); |
|
|
929 |
$sessionID = undef; |
921 |
$sessionID = undef; |
930 |
$userid = undef; |
922 |
$userid = undef; |
931 |
|
923 |
|
Lines 948-954
sub checkauth {
Link Here
|
948 |
} |
940 |
} |
949 |
C4::Context->_unset_userenv($sessionID); |
941 |
C4::Context->_unset_userenv($sessionID); |
950 |
|
942 |
|
951 |
#_session_log(sprintf "%20s from %16s logged out at %30s (inactivity).\n", $userid,$ip,(strftime "%c",localtime)); |
|
|
952 |
$userid = undef; |
943 |
$userid = undef; |
953 |
$sessionID = undef; |
944 |
$sessionID = undef; |
954 |
} |
945 |
} |
Lines 962-968
sub checkauth {
Link Here
|
962 |
$session->flush; |
953 |
$session->flush; |
963 |
C4::Context->_unset_userenv($sessionID); |
954 |
C4::Context->_unset_userenv($sessionID); |
964 |
|
955 |
|
965 |
#_session_log(sprintf "%20s from %16s logged out at %30s (ip changed to %16s).\n", $userid,$ip,(strftime "%c",localtime), $info{'newip'}); |
|
|
966 |
$sessionID = undef; |
956 |
$sessionID = undef; |
967 |
$userid = undef; |
957 |
$userid = undef; |
968 |
} |
958 |
} |
Lines 1123-1129
sub checkauth {
Link Here
|
1123 |
# $return: 1 = valid user |
1113 |
# $return: 1 = valid user |
1124 |
if ($return) { |
1114 |
if ($return) { |
1125 |
|
1115 |
|
1126 |
#_session_log(sprintf "%20s from %16s logged in at %30s.\n", $userid,$ENV{'REMOTE_ADDR'},(strftime '%c', localtime)); |
|
|
1127 |
if ( $flags = haspermission( $userid, $flagsrequired ) ) { |
1116 |
if ( $flags = haspermission( $userid, $flagsrequired ) ) { |
1128 |
$loggedin = 1; |
1117 |
$loggedin = 1; |
1129 |
} |
1118 |
} |
1130 |
- |
|
|