Use strftime to format sessionlog times
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
This commit is contained in:
parent
bfbd5dc61d
commit
d3c734c750
1 changed files with 5 additions and 4 deletions
|
@ -28,6 +28,7 @@ use C4::Members;
|
|||
use C4::Koha;
|
||||
use C4::Branch; # GetBranches
|
||||
use C4::VirtualShelves;
|
||||
use POSIX qw/strftime/;
|
||||
|
||||
# use utf8;
|
||||
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $debug $ldap);
|
||||
|
@ -575,7 +576,7 @@ sub checkauth {
|
|||
$session->flush;
|
||||
$session->delete();
|
||||
C4::Context->_unset_userenv($sessionID);
|
||||
_session_log(sprintf "%20s from %16s logged out at %30s (manually).\n", $userid,$ip,localtime);
|
||||
_session_log(sprintf "%20s from %16s logged out at %30s (manually).\n", $userid,$ip,(strftime "%c",localtime));
|
||||
$sessionID = undef;
|
||||
$userid = undef;
|
||||
}
|
||||
|
@ -584,7 +585,7 @@ sub checkauth {
|
|||
$info{'timed_out'} = 1;
|
||||
$session->delete();
|
||||
C4::Context->_unset_userenv($sessionID);
|
||||
_session_log(sprintf "%20s from %16s logged out at %30s (inactivity).\n", $userid,$ip,localtime);
|
||||
_session_log(sprintf "%20s from %16s logged out at %30s (inactivity).\n", $userid,$ip,(strftime "%c",localtime));
|
||||
$userid = undef;
|
||||
$sessionID = undef;
|
||||
}
|
||||
|
@ -595,7 +596,7 @@ sub checkauth {
|
|||
$info{'different_ip'} = 1;
|
||||
$session->delete();
|
||||
C4::Context->_unset_userenv($sessionID);
|
||||
_session_log(sprintf "%20s from %16s logged out at %30s (ip changed to %16s).\n", $userid,$ip,localtime, $info{'newip'});
|
||||
_session_log(sprintf "%20s from %16s logged out at %30s (ip changed to %16s).\n", $userid,$ip,(strftime "%c",localtime), $info{'newip'});
|
||||
$sessionID = undef;
|
||||
$userid = undef;
|
||||
}
|
||||
|
@ -622,7 +623,7 @@ sub checkauth {
|
|||
my $password = $query->param('password');
|
||||
my ( $return, $cardnumber ) = checkpw( $dbh, $userid, $password );
|
||||
if ($return) {
|
||||
_session_log(sprintf "%20s from %16s logged in at %30s.\n", $userid,$ENV{'REMOTE_ADDR'},localtime);
|
||||
_session_log(sprintf "%20s from %16s logged in at %30s.\n", $userid,$ENV{'REMOTE_ADDR'},(strftime "%c",localtime));
|
||||
if ( $flags = haspermission($userid, $flagsrequired) ) {
|
||||
$loggedin = 1;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue