cvs: pear /Perm_LiveUser LiveUser.php
| From: | Lukas Smith | Date: | Mon, 06 Oct 2003 08:43:07 +0000 |
| Subject: | cvs: pear /Perm_LiveUser LiveUser.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-13411@lists.php.net to get a copy of this message | ||
lsmith Mon Oct 6 04:43:07 2003 EDT
Modified files:
/pear/Perm_LiveUser LiveUser.php
Log:
- fixed notice when calling session_start twice without a session_destroy in between
- fixed a few tabs to spaces
Index: pear/Perm_LiveUser/LiveUser.php
diff -u pear/Perm_LiveUser/LiveUser.php:1.47 pear/Perm_LiveUser/LiveUser.php:1.48
--- pear/Perm_LiveUser/LiveUser.php:1.47 Fri Oct 3 17:56:03 2003
+++ pear/Perm_LiveUser/LiveUser.php Mon Oct 6 04:43:06 2003
@@ -91,7 +91,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.47 2003/10/03 21:56:03 mw21st Exp $
+ * @version $Id: LiveUser.php,v 1.48 2003/10/06 08:43:06 lsmith Exp $
* @package LiveUser
*/
class LiveUser
@@ -449,10 +449,10 @@
mcrypt_generic_deinit($td);
mcrypt_module_close($td);
} else {
- if (!file_exists('Crypt/Rc4.php')) {
- return PEAR::raiseError(null, LIVEUSER_NOT_SUPPORTED, null, E_USER_WARNING,
- 'Please install Crypt_RC4 to use this feature', true);
- }
+ if (!file_exists('Crypt/Rc4.php')) {
+ return PEAR::raiseError(null, LIVEUSER_NOT_SUPPORTED, null, E_USER_WARNING,
+ 'Please install Crypt_RC4 to use this feature', true);
+ }
include_once 'Crypt/Rc4.php';
$rc4 =& new Crypt_RC4($this->_options['cookie']['secret']);
if ($crypt) {
@@ -549,13 +549,13 @@
return false;
}
- // Determine if user wanted to log out
- $this->processLogout($logout);
-
// Set the name of the current session
session_name($this->_options['session']['name']);
// If there's no session yet, start it now
- @session_start();
+ session_start();
+
+ // Determine if user wanted to log out
+ $this->processLogout($logout);
// Include needed permission container class
if (is_array($this->permContainer)) {
@@ -914,11 +914,6 @@
return false;
}
- // Set the name of the current session
- session_name($this->_options['session']['name']);
- // If there's no session yet, start it now
- session_start();
-
// If a callback function is set, call it
if (!empty($this->_options['logout']['function']) &&
function_exists($this->_options['logout']['function']))
@@ -941,6 +936,11 @@
// If the session should be destroyed, do so now...
if ($this->_options['logout']['destroy'] == true) {
session_destroy();
+
+ // Set the name of the current session
+ session_name($this->_options['session']['name']);
+ // If there's no session yet, start it now
+ session_start();
}
// Finally, set the LoginManager's internal auth object back to NULL