cvs: pear /Perm_LiveUser LoginManager.php

From: Date: Sun, 23 Mar 2003 22:05:53 +0000
Subject: cvs: pear /Perm_LiveUser LoginManager.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-9599@lists.php.net to get a copy of this message
krausbn Sun Mar 23 17:05:53 2003 EDT Modified files: /pear/Perm_LiveUser LoginManager.php Log: * Status now works. * Fixed bug in expire and idle check. Index: pear/Perm_LiveUser/LoginManager.php diff -u pear/Perm_LiveUser/LoginManager.php:1.74 pear/Perm_LiveUser/LoginManager.php:1.75 --- pear/Perm_LiveUser/LoginManager.php:1.74 Sun Mar 23 16:06:05 2003 +++ pear/Perm_LiveUser/LoginManager.php Sun Mar 23 17:05:53 2003 @@ -85,7 +85,7 @@ * Bjoern Schotte, Kristian Koehntopp, Antonio Guerra * * @author Markus Wolff <wolff@21st.de> - * @version $Id: LoginManager.php,v 1.74 2003/03/23 21:06:05 krausbn Exp $ + * @version $Id: LoginManager.php,v 1.75 2003/03/23 22:05:53 krausbn Exp $ * @package LiveUser */ class LoginManager extends PEAR @@ -386,6 +386,7 @@ // Check if authentication session is expired. if (is_object($this->_auth) && + $this->_auth->loggedIn && $this->_auth->expireTime > 0 && $this->_auth->currentLogin > 0 && ($this->_auth->currentLogin + $this->_auth->expireTime) < time()) { @@ -397,6 +398,7 @@ // Check if maximum idle time is reached. if (is_object($this->_auth) && + $this->_auth->loggedIn && $this->_auth->idleTime > 0 && isset($_SESSION[$this->sessionVarName]['idle']) && ($_SESSION[$this->sessionVarName]['idle'] + $this->_auth->idleTime) < time()) { @@ -471,6 +473,7 @@ $auth->login($handle, $passwd, true); if ($auth->loggedIn) { $userFound = true; + $this->status = LIVEUSER_AUTH_OK; $this->_auth = $auth; $this->_auth->backendArrayIndex = $counter; @@ -488,10 +491,13 @@ $this->freeze($counter); } elseif ($auth->handle != '') { + $this->status = LIVEUSER_AUTH_ISINACTIVE; $userFound = true; $this->_auth = $auth; $this->_auth->backendArrayIndex = $counter; $this->freeze($counter); + } else { + $this->status = LIVEUSER_AUTH_WRONG_LOGIN; } $counter++; } // End loop into backends

« previous php.pear.cvs (#9599) next »