From 60e486b5697030d18311f67de29b95a892c7d95d Mon Sep 17 00:00:00 2001 From: xue <> Date: Tue, 7 Feb 2006 19:05:33 +0000 Subject: Added UrlFormat property to THttpRequest. --- framework/Security/TAuthManager.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'framework/Security') diff --git a/framework/Security/TAuthManager.php b/framework/Security/TAuthManager.php index c46e32c1..819b7b36 100644 --- a/framework/Security/TAuthManager.php +++ b/framework/Security/TAuthManager.php @@ -169,12 +169,21 @@ class TAuthManager extends TModule if($service instanceof TPageService) { $returnUrl=$application->getRequest()->getRequestUri(); - $url=$service->constructUrl($this->getLoginPage(),array(self::RETURN_URL_VAR=>$returnUrl)); + $application->getSession()->add(self::RETURN_URL_VAR,$returnUrl); + $url=$service->constructUrl($this->getLoginPage()); $application->getResponse()->redirect($url); } } } + /** + * @return string URL that the browser should be redirected to when login succeeds. + */ + public function getReturnUrl() + { + return $this->getSession()->itemAt(self::RETURN_URL_VAR); + } + /** * Performs the real authentication work. * An OnAuthenticate event will be raised if there is any handler attached to it. -- cgit v1.2.3