[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] CVS: koha/C4 Auth.pm,1.2,1.3
From: |
Steve Tonnesen |
Subject: |
[Koha-cvs] CVS: koha/C4 Auth.pm,1.2,1.3 |
Date: |
Thu, 04 Jul 2002 14:09:46 -0700 |
Update of /cvsroot/koha/koha/C4
In directory usw-pr-cvs1:/tmp/cvs-serv19965/C4
Modified Files:
Auth.pm
Log Message:
Additions to authentication scheme. Logs to /tmp/sessionlog. Will move this
to a db table.
Index: Auth.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Auth.pm,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** Auth.pm 4 Jul 2002 19:42:48 -0000 1.2
--- Auth.pm 4 Jul 2002 21:09:43 -0000 1.3
***************
*** 34,37 ****
--- 34,40 ----
my $sti=$dbh->prepare("delete from sessions where sessionID=?");
$sti->execute($sessionID);
+ open L, ">>/tmp/sessionlog";
+ print L "$userid from $ip logged out at ".localtime(time())."
(inactivity).\n";
+ close L;
} elsif ($ip ne $ENV{'REMOTE_ADDR'}) {
# Different ip than originally logged in from
***************
*** 59,66 ****
--- 62,75 ----
my $sti=$dbh->prepare("insert into sessions (sessionID, userid,
ip,lasttime) values (?, ?, ?, ?)");
$sti->execute($sessionID, $userid, $ENV{'REMOTE_ADDR'}, time());
+ open L, ">>/tmp/sessionlog";
+ print L "$userid from ".$ENV{'REMOTE_ADDR'}." logged in at
".localtime(time()).".\n";
+ close L;
return ($userid, $sessionID, $sessionID);
} elsif ($userid eq 'patron' && $password eq 'koha') {
my $sti=$dbh->prepare("insert into sessions (sessionID, userid,
ip,lasttime) values (?, ?, ?, ?)");
$sti->execute($sessionID, $userid, $ENV{'REMOTE_ADDR'}, time());
+ open L, ">>/tmp/sessionlog";
+ print L "$userid from ".$ENV{'REMOTE_ADDR'}." at
".localtime(time()).".\n";
+ close L;
return ($userid, $sessionID, $sessionID);
} else {
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] CVS: koha/C4 Auth.pm,1.2,1.3,
Steve Tonnesen <=
- Prev by Date:
[Koha-cvs] CVS: koha/C4 Auth.pm,1.1,1.2
- Next by Date:
[Koha-cvs] CVS: koha logout.pl,NONE,1.1 shelves.pl,1.5,1.6
- Previous by thread:
[Koha-cvs] CVS: koha/C4 Auth.pm,1.1,1.2
- Next by thread:
[Koha-cvs] CVS: koha logout.pl,NONE,1.1 shelves.pl,1.5,1.6
- Index(es):