From ae8bd1dbf84441c18d5f38b7a0830d3b57d997a9 Mon Sep 17 00:00:00 2001 From: tipaul Date: Thu, 10 Oct 2002 14:47:00 +0000 Subject: [PATCH] cleaning code --- C4/Auth.pm | 53 ----------------------------------------------------- 1 file changed, 53 deletions(-) diff --git a/C4/Auth.pm b/C4/Auth.pm index 31c05ea82b..79b12bf75b 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -126,10 +126,8 @@ sub checkauth { -expires => '+1y'); return ($userid, $cookie, ''); } - warn "passe 1"; # Get session ID from cookie. my $sessionID=$query->cookie('sessionID'); - warn "sessionId = $sessionID"; # FIXME - Error-checking: if the user isn't allowing cookies, # $sessionID will be undefined. Don't confuse this with an # expired cookie. @@ -141,7 +139,6 @@ sub checkauth { my $sth=$dbh->prepare("select userid,ip,lasttime from sessions where sessionid=?"); $sth->execute($sessionID); if ($sth->rows) { - warn "IF 1"; my ($userid, $ip, $lasttime) = $sth->fetchrow; # FIXME - Back door for tonnensen if ($lasttimecookie(-name => 'sessionID', @@ -191,13 +186,11 @@ sub checkauth { return ($userid, $cookie, $sessionID); } } - warn "AFTER"; # If we get this far, it's because we haven't received a cookie # with a valid session ID. Need to start a new session and set a # new cookie. if ($authnotrequired) { - warn "authnotrequired"; # This script doesn't require the user to be logged in. Return # just the cookie, without user ID or session ID information. my $cookie=$query->cookie(-name => 'sessionID', @@ -205,7 +198,6 @@ sub checkauth { -expires => '+1y'); return('', $cookie, ''); } else { - warn "ELSE3"; # This script requires authorization. Assume that we were # given user and password information; generate a new session. @@ -213,10 +205,8 @@ sub checkauth { ($sessionID) || ($sessionID=int(rand()*100000).'-'.time()); my $userid=$query->param('userid'); my $password=$query->param('password'); - warn "calling checkpw"; if (checkpw($dbh, $userid, $password)) { # The given password is valid - warn "VALID"; # Delete any old copies of this session. my $sti=$dbh->prepare("delete from sessions where sessionID=? and userid=?"); $sti->execute($sessionID, $userid); @@ -250,7 +240,6 @@ sub checkauth { } else { # Either we weren't given a user id and password, or else # the password was invalid. - warn "INVALID"; if ($userid) { $message="Invalid userid or password entered."; } @@ -262,48 +251,6 @@ sub checkauth { -value => $sessionID, -expires => '+1y'); return ("",$cookie,$sessionID); - print $query->header(-cookie=>$cookie); - print qq| - - -
-

$message

- -
- - -
- - - - - - -
Koha Login
Name:
Password:
- -
- - - - - -
Demo Information
- Log in as librarian/koha or patron/koha. The timeout is set to 40 seconds of - inactivity for the purposes of this demo. You can navigate to the Circulation - or Acquisitions modules and you should see an indicator in the upper left of - the screen saying who you are logged in as. If you want to try it out with - a longer timout period, log in as tonnesen/koha and there will be no - timeout period. -

- You can also log in using a patron cardnumber. Try V10000008 and - V1000002X with password koha. -

-
-
- - -|; - exit; } } } -- 2.20.1