cvs: pear /Perm_LiveUser LiveUser.php
| From: | Bj�rn Kraus | Date: | Thu, 05 Jun 2003 16:52:32 +0000 |
| Subject: | cvs: pear /Perm_LiveUser LiveUser.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-10714@lists.php.net to get a copy of this message | ||
krausbn Thu Jun 5 12:52:32 2003 EDT
Modified files:
/pear/Perm_LiveUser LiveUser.php
Log:
- Added error message for missing logout function.
- Logout function is not necessary for processLogout() anymore.
- Included PEAR.php by default.
Index: pear/Perm_LiveUser/LiveUser.php
diff -u pear/Perm_LiveUser/LiveUser.php:1.10 pear/Perm_LiveUser/LiveUser.php:1.11
--- pear/Perm_LiveUser/LiveUser.php:1.10 Sun May 25 09:11:31 2003
+++ pear/Perm_LiveUser/LiveUser.php Thu Jun 5 12:52:32 2003
@@ -28,6 +28,8 @@
* @category authentication
*/
+require_once 'PEAR.php';
+
/**#@+
* Error related constants definition
*
@@ -92,7 +94,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.10 2003/05/25 13:11:31 arnaud Exp $
+ * @version $Id: LiveUser.php,v 1.11 2003/06/05 16:52:32 krausbn Exp $
* @package LiveUser
* @category authentication
*/
@@ -424,8 +426,6 @@
*/
function raiseError($message = null, $code = null, $userinfo = null)
{
- include_once 'PEAR.php';
-
return PEAR::raiseError($message, $code, null, null, $userinfo);
}
@@ -449,6 +449,7 @@
LIVEUSER_CONFIG_PHP_MISSING_ARRAY => 'The config array has not been
found',
LIVEUSER_MISSING_LOGINFUNCTION => 'Login function not found',
LIVEUSER_CONFIG_ARRAY_NOT_AN_ARRAY => 'The config array is not an
array',
+ LIVEUSER_MISSING_LOGOUTFUNCTION => 'Logout function not found',
LIVEUSER_CANNOT_STORE_COOKIE_ID => 'Cannot store the cookie id on the
server',
LIVEUSER_CANNOT_ACCESS_COOKIE_STORE => 'Cannot access cookie store in
read/write mode',
LIVEUSER_CANNOT_RETRIEVE_AUTH_OBJECT => 'Cannot retrieve Auth object from
session'
@@ -852,14 +853,8 @@
// If a callback function is set, call it
if (!empty($this->logoutFunction) &&
function_exists($this->logoutFunction)) {
call_user_func($this->logoutFunction, $this);
- } else {
- return LiveUser::raiseError(
- LiveUser::errorMessage(LIVEUSER_MISSING_LOGOUTFUNCTION),
- LIVEUSER_MISSING_LOGOUTFUNCTION
- );
}
-
// If there's a URL to redirect to on logout, do so
if ($this->logoutRedirectURL != '') {
header('Location: '.$this->logoutRedirectURL);
@@ -1282,10 +1277,10 @@
*/
function getRights($withLevels = false)
{
- if (is_object($this->_perm)) {
- return($this->_perm->getRights($withLevels));
- }
- return(false);
+ if (is_object($this->_perm)) {
+ return($this->_perm->getRights($withLevels));
+ }
+ return(false);
}
/**