cvs: pear /Auth Auth.php
| From: | Martin Jansen | Date: | Sat, 04 May 2002 09:42:31 +0000 |
| Subject: | cvs: pear /Auth Auth.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-3689@lists.php.net to get a copy of this message | ||
mj Sat May 4 05:42:31 2002 EDT
Modified files:
/pear/Auth Auth.php
Log:
* Don't update idletime after expiration.
* Get rid of a warning in checkAuth().
Index: pear/Auth/Auth.php
diff -u pear/Auth/Auth.php:1.32 pear/Auth/Auth.php:1.33
--- pear/Auth/Auth.php:1.32 Sat Mar 2 05:46:39 2002
+++ pear/Auth/Auth.php Sat May 4 05:42:31 2002
@@ -16,7 +16,7 @@
// | Authors: Martin Jansen <mj@php.net> |
// +----------------------------------------------------------------------+
//
-// $Id: Auth.php,v 1.32 2002/03/02 10:46:39 mj Exp $
+// $Id: Auth.php,v 1.33 2002/05/04 09:42:31 mj Exp $
//
require_once "PEAR.php";
@@ -132,7 +132,7 @@
*
* @author Martin Jansen <mj@php.net>
* @package Auth
- * @version $Revision: 1.32 $
+ * @version $Revision: 1.33 $
*/
define("AUTH_IDLED", -1);
@@ -427,7 +427,7 @@
* @return void
*/
function setAuth($username, $data = null)
- {
+ {
$session = &Auth::_importGlobalVariable("session");
if (!isset($session['auth'])) {
@@ -469,8 +469,6 @@
$this->expired = true;
$this->status = AUTH_EXPIRED;
- Auth::updateIdle();
-
return false;
}
@@ -509,8 +507,15 @@
function getAuth()
{
$session = &$this->_importGlobalVariable("session");
-
- return (true == !empty($session) &&
$session['auth']['registered']) ? true : false;
+
+ if (!empty($session) &&
+ (isset($session['auth']['registered']) &&
+ $session['auth']['registered'] === true))
+ {
+ return true;
+ } else {
+ return false;
+ }
}
// }}}
@@ -525,7 +530,6 @@
* consult the documentation.
*
* @access private
- * @global $HTTP_SERVER_VARS
* @param string Username if already entered
* @return void
*/
@@ -667,6 +671,7 @@
return $this->storage->listUsers();
}
+ // }}}
// {{{ addUser()
/**
@@ -712,7 +717,6 @@
*/
function &_importGlobalVariable($variable)
{
-
$var = null;
switch (strtolower($variable)) {
@@ -750,6 +754,5 @@
}
// }}}
-
}
?>