summaryrefslogtreecommitdiff
path: root/framework/Security
diff options
context:
space:
mode:
authorxue <>2006-02-07 19:05:33 +0000
committerxue <>2006-02-07 19:05:33 +0000
commit60e486b5697030d18311f67de29b95a892c7d95d (patch)
treeb61991b7a3b419d586980ef9a5ad318c1429b4ea /framework/Security
parentee2e653ec9da8cc311989acf6b21b78d32cc80c3 (diff)
Added UrlFormat property to THttpRequest.
Diffstat (limited to 'framework/Security')
-rw-r--r--framework/Security/TAuthManager.php11
1 files changed, 10 insertions, 1 deletions
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,13 +169,22 @@ 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.
* If the application already has a non-null user, it will return without further authentication.