Lines 32-37
use C4::Members;
Link Here
|
32 |
use C4::Koha; |
32 |
use C4::Koha; |
33 |
use C4::Branch; # GetBranches |
33 |
use C4::Branch; # GetBranches |
34 |
use C4::VirtualShelves; |
34 |
use C4::VirtualShelves; |
|
|
35 |
use POSIX qw/strftime/; |
35 |
|
36 |
|
36 |
# use utf8; |
37 |
# use utf8; |
37 |
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $debug $ldap); |
38 |
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $debug $ldap); |
Lines 549-555
sub checkauth {
Link Here
|
549 |
$session->flush; |
550 |
$session->flush; |
550 |
$session->delete(); |
551 |
$session->delete(); |
551 |
C4::Context->_unset_userenv($sessionID); |
552 |
C4::Context->_unset_userenv($sessionID); |
552 |
_session_log(sprintf "%20s from %16s logged out at %30s (manually).\n", $userid,$ip,localtime); |
553 |
_session_log(sprintf "%20s from %16s logged out at %30s (manually).\n", $userid,$ip,(strftime "%c",localtime)); |
553 |
$sessionID = undef; |
554 |
$sessionID = undef; |
554 |
$userid = undef; |
555 |
$userid = undef; |
555 |
} |
556 |
} |
Lines 558-564
sub checkauth {
Link Here
|
558 |
$info{'timed_out'} = 1; |
559 |
$info{'timed_out'} = 1; |
559 |
$session->delete(); |
560 |
$session->delete(); |
560 |
C4::Context->_unset_userenv($sessionID); |
561 |
C4::Context->_unset_userenv($sessionID); |
561 |
_session_log(sprintf "%20s from %16s logged out at %30s (inactivity).\n", $userid,$ip,localtime); |
562 |
_session_log(sprintf "%20s from %16s logged out at %30s (inactivity).\n", $userid,$ip,(strftime "%c",localtime)); |
562 |
$userid = undef; |
563 |
$userid = undef; |
563 |
$sessionID = undef; |
564 |
$sessionID = undef; |
564 |
} |
565 |
} |
Lines 569-575
sub checkauth {
Link Here
|
569 |
$info{'different_ip'} = 1; |
570 |
$info{'different_ip'} = 1; |
570 |
$session->delete(); |
571 |
$session->delete(); |
571 |
C4::Context->_unset_userenv($sessionID); |
572 |
C4::Context->_unset_userenv($sessionID); |
572 |
_session_log(sprintf "%20s from %16s logged out at %30s (ip changed to %16s).\n", $userid,$ip,localtime, $info{'newip'}); |
573 |
_session_log(sprintf "%20s from %16s logged out at %30s (ip changed to %16s).\n", $userid,$ip,(strftime "%c",localtime), $info{'newip'}); |
573 |
$sessionID = undef; |
574 |
$sessionID = undef; |
574 |
$userid = undef; |
575 |
$userid = undef; |
575 |
} |
576 |
} |
Lines 596-602
sub checkauth {
Link Here
|
596 |
my $password = $query->param('password'); |
597 |
my $password = $query->param('password'); |
597 |
my ( $return, $cardnumber ) = checkpw( $dbh, $userid, $password ); |
598 |
my ( $return, $cardnumber ) = checkpw( $dbh, $userid, $password ); |
598 |
if ($return) { |
599 |
if ($return) { |
599 |
_session_log(sprintf "%20s from %16s logged in at %30s.\n", $userid,$ENV{'REMOTE_ADDR'},localtime); |
600 |
_session_log(sprintf "%20s from %16s logged in at %30s.\n", $userid,$ENV{'REMOTE_ADDR'},(strftime "%c",localtime)); |
600 |
if ( $flags = haspermission( $dbh, $userid, $flagsrequired ) ) { |
601 |
if ( $flags = haspermission( $dbh, $userid, $flagsrequired ) ) { |
601 |
$loggedin = 1; |
602 |
$loggedin = 1; |
602 |
} |
603 |
} |
603 |
- |
|
|