diff options
author | xue <> | 2006-08-02 01:06:16 +0000 |
---|---|---|
committer | xue <> | 2006-08-02 01:06:16 +0000 |
commit | 38fc83fb70a87f0f8a1b4bc0f4753e3063749522 (patch) | |
tree | ae8d0ab570dc1f33bb4a4a1b93d8d23d032c72f3 /framework/Security/TAuthManager.php | |
parent | 8ab3ff590bd67acf666c6f3e2c71032424dd93ce (diff) |
Fixed an issue in TAuthManager about authentication order.
Diffstat (limited to 'framework/Security/TAuthManager.php')
-rw-r--r-- | framework/Security/TAuthManager.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/framework/Security/TAuthManager.php b/framework/Security/TAuthManager.php index ee01d5f3..e378b51e 100644 --- a/framework/Security/TAuthManager.php +++ b/framework/Security/TAuthManager.php @@ -195,10 +195,6 @@ class TAuthManager extends TModule public function onAuthenticate($param)
{
$application=$this->getApplication();
- if($this->hasEventHandler('OnAuthenticate'))
- $this->raiseEvent('OnAuthenticate',$this,$application);
- if($application->getUser()!==null)
- return;
if(($session=$application->getSession())===null)
throw new TConfigurationException('authmanager_session_required');
@@ -206,6 +202,10 @@ class TAuthManager extends TModule $sessionInfo=$session->itemAt($this->generateUserSessionKey());
$user=$this->_userManager->getUser(null)->loadFromString($sessionInfo);
$application->setUser($user);
+
+ // event handler gets a chance to do further auth work
+ if($this->hasEventHandler('OnAuthenticate'))
+ $this->raiseEvent('OnAuthenticate',$this,$application);
}
/**
|