From b4e9f6795206fab6b952f814ccf812677a34c635 Mon Sep 17 00:00:00 2001 From: xue <> Date: Wed, 7 Dec 2005 00:32:29 +0000 Subject: --- framework/Security/TAuthManager.php | 24 +++--------------------- framework/Security/TUserManager.php | 24 +++--------------------- 2 files changed, 6 insertions(+), 42 deletions(-) (limited to 'framework/Security') diff --git a/framework/Security/TAuthManager.php b/framework/Security/TAuthManager.php index ae3f713f..3bf6964e 100644 --- a/framework/Security/TAuthManager.php +++ b/framework/Security/TAuthManager.php @@ -34,16 +34,12 @@ Prado::using('System.Security.TUserManager'); * @package System.Security * @since 3.0 */ -class TAuthManager extends TComponent implements IModule +class TAuthManager extends TModule { /** * GET variable name for return url */ const RETURN_URL_VAR='ReturnUrl'; - /** - * @var string module ID - */ - private $_id; /** * @var boolean if the module has been initialized */ @@ -65,22 +61,6 @@ class TAuthManager extends TComponent implements IModule */ private $_skipAuthorization=false; - /** - * @return string id of this module - */ - public function getID() - { - return $this->_id; - } - - /** - * @param string id of this module - */ - public function setID($value) - { - $this->_id=$value; - } - /** * Initializes this module. * This method is required by the IModule interface. @@ -90,6 +70,8 @@ class TAuthManager extends TComponent implements IModule */ public function init($application,$config) { + parent::init($application,$config); + if($this->_userManager===null) throw new TConfigurationException('authmanager_usermanager_required'); if(is_string($this->_userManager)) diff --git a/framework/Security/TUserManager.php b/framework/Security/TUserManager.php index 9da386f0..d9210661 100644 --- a/framework/Security/TUserManager.php +++ b/framework/Security/TUserManager.php @@ -189,12 +189,8 @@ class TUser extends TComponent implements IUser * @package System.Security * @since 3.0 */ -class TUserManager extends TComponent implements IModule +class TUserManager extends TModule { - /** - * @var string id of this module - */ - private $_id; /** * @var array list of users managed by this module */ @@ -221,6 +217,8 @@ class TUserManager extends TComponent implements IModule */ public function init($application,$config) { + parent::init($application,$config); + foreach($config->getElementsByTagName('user') as $node) $this->_users[strtolower($node->getAttribute('name'))]=$node->getAttribute('password'); foreach($config->getElementsByTagName('role') as $node) @@ -233,22 +231,6 @@ class TUserManager extends TComponent implements IModule } } - /** - * @return string id of this module - */ - public function getID() - { - return $this->_id; - } - - /** - * @param string id of this module - */ - public function setID($value) - { - $this->_id=$value; - } - /** * @return string guest name, defaults to 'Guest' */ -- cgit v1.2.3