diff options
author | xue <> | 2006-08-02 02:24:29 +0000 |
---|---|---|
committer | xue <> | 2006-08-02 02:24:29 +0000 |
commit | 550ba06593b467b643862d41a00ca2dd12ee704b (patch) | |
tree | 16ad8180c2f0b96454453effff89dc236469ee4f /framework/Security | |
parent | ccfa7850dc435ae9941cde18be827b3aac550f85 (diff) |
merge from 3.0 branch till 1320.
Diffstat (limited to 'framework/Security')
-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);
}
/**
|