cvs: pear /LiveUser LiveUser.php
| From: | Lukas Smith | Date: | Mon, 07 Feb 2005 16:11:33 +0000 |
| Subject: | cvs: pear /LiveUser LiveUser.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-29178@lists.php.net to get a copy of this message | ||
lsmith Mon Feb 7 11:11:33 2005 EDT
Modified files:
/pear/LiveUser LiveUser.php
Log:
- moved up the unfreeze() call in init() even further to ensure that the remember me cookie is
only used when absolutely necessary
http://cvs.php.net/diff.php/pear/LiveUser/LiveUser.php?r1=1.40&r2=1.41&ty=u
Index: pear/LiveUser/LiveUser.php
diff -u pear/LiveUser/LiveUser.php:1.40 pear/LiveUser/LiveUser.php:1.41
--- pear/LiveUser/LiveUser.php:1.40 Mon Feb 7 10:12:29 2005
+++ pear/LiveUser/LiveUser.php Mon Feb 7 11:11:32 2005
@@ -156,7 +156,7 @@
* @author Lukas Smith <smith@backendmedia.com>
* @author Pierre-Alain Joye <pajoye@php.net>
* @author Arnaud Limbourg <arnaud@php.net>
- * @version $Id: LiveUser.php,v 1.40 2005/02/07 15:12:29 lsmith Exp $
+ * @version $Id: LiveUser.php,v 1.41 2005/02/07 16:11:32 lsmith Exp $
* @package LiveUser
*/
class LiveUser
@@ -891,7 +891,12 @@
// If there's no session yet, start it now
@session_start();
- if (!$logout && empty($handle)) {
+ // Try to fetch auth object from session
+ $this->unfreeze();
+
+ // If the user did not previously authenticate and is neither
+ // logging out or login in, check if there is a remember me cookie
+ if (!$this->isLoggedIn() && !$logout && empty($handle)) {
$result = $this->readRememberCookie();
if (is_array($result)) {
$handle = $result['handle'];
@@ -899,9 +904,6 @@
}
}
- // Try to fetch auth object from session
- $this->unfreeze();
-
if ($logout || $handle) {
$this->logout($logout);
}