From 4767317d3dcc4316609154287b643eb85afbd9e2 Mon Sep 17 00:00:00 2001 From: xue <> Date: Sun, 20 Nov 2005 14:15:37 +0000 Subject: --- framework/Security/TAuthManager.php | 37 +++++++++++++++++++++++++------------ 1 file changed, 25 insertions(+), 12 deletions(-) (limited to 'framework/Security/TAuthManager.php') diff --git a/framework/Security/TAuthManager.php b/framework/Security/TAuthManager.php index 5e9b188f..32b68cdd 100644 --- a/framework/Security/TAuthManager.php +++ b/framework/Security/TAuthManager.php @@ -1,9 +1,32 @@ + * @link http://www.pradosoft.com/ + * @copyright Copyright © 2005 PradoSoft + * @license http://www.pradosoft.com/license/ + * @version $Revision: $ $Date: $ + * @package System.Security + */ + +/** + * TAuthManager class + * + * TAuthManager performs user authentication and authorization for a Prado application. + * + * + * @author Qiang Xue + * @version $Revision: $ $Date: $ + * @package System.Security + * @since 3.0 + */ + +Prado::using('System.Security.TUserManager'); class TAuthManager extends TComponent implements IModule { const RETURN_URL_VAR='ReturnUrl'; - private $_guest='Guest'; private $_initialized=false; private $_application; private $_users=null; @@ -41,16 +64,6 @@ class TAuthManager extends TComponent implements IModule $this->_initialized=true; } - public function getGuestName() - { - return $this->_guest; - } - - public function setGuestName($value) - { - $this->_guest=$value; - } - public function getUserManager() { if($this->_users instanceof TUserManager) @@ -182,7 +195,7 @@ class TAuthManager extends TComponent implements IModule throw new TConfigurationException('authenticator_session_required'); else { - $userManager->logout($this->_application->getUser()); + $userManager->switchToGuest($this->_application->getUser()); $session->destroy(); } } -- cgit v1.2.3