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