From 345f4c1e149d7c84e9d10831971e2a9061246d72 Mon Sep 17 00:00:00 2001 From: xue <> Date: Sun, 1 Apr 2007 01:25:29 +0000 Subject: fixed #575. --- framework/Security/TAuthManager.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'framework') diff --git a/framework/Security/TAuthManager.php b/framework/Security/TAuthManager.php index 481b9ddb..548e9522 100644 --- a/framework/Security/TAuthManager.php +++ b/framework/Security/TAuthManager.php @@ -169,7 +169,7 @@ class TAuthManager extends TModule if($service instanceof TPageService) { $returnUrl=$application->getRequest()->getRequestUri(); - $application->getSession()->add(self::RETURN_URL_VAR,$returnUrl); + $this->setReturnUrl($returnUrl); $url=$service->constructUrl($this->getLoginPage()); $application->getResponse()->redirect($url); } @@ -184,6 +184,15 @@ class TAuthManager extends TModule return $this->getSession()->itemAt(self::RETURN_URL_VAR); } + /** + * Sets the URL that the browser should be redirected to when login succeeds. + * @param string the URL to be redirected to. + */ + public function setReturnUrl($value) + { + $this->getSession()->add(self::RETURN_URL_VAR,$value); + } + /** * Performs the real authentication work. * An OnAuthenticate event will be raised if there is any handler attached to it. -- cgit v1.2.3