diff options
| author | xue <> | 2007-04-01 01:25:29 +0000 | 
|---|---|---|
| committer | xue <> | 2007-04-01 01:25:29 +0000 | 
| commit | 345f4c1e149d7c84e9d10831971e2a9061246d72 (patch) | |
| tree | 1d4798a917704f0de4e79528097937d13230ed06 | |
| parent | c0d52d5a963147fa9d9ac6e1995931a3c802b5a5 (diff) | |
fixed #575.
| -rw-r--r-- | HISTORY | 1 | ||||
| -rw-r--r-- | framework/Security/TAuthManager.php | 11 | 
2 files changed, 11 insertions, 1 deletions
| @@ -30,6 +30,7 @@ ENH: Ticket#537 - TActiveRecord Pk info ENH [usage: http://trac.pradosoft.com/pr  ENH: Ticket#561 - Powered by PRADO image to become an asset (Qiang)  ENH: Ticket#569 - Added TTextBox.PersistPassword property (Qiang)  ENH: Ticket#571 - Made TPage.ClientSupportsJavaScript property writable (Qiang) +ENH: Ticket#575 - Made TAuthManager.ReturnUrl property writable (Qiang)  ENH: Added PRADO_CHMOD constant so that users can specify the permission of PRADO-created directories (Qiang)  ENH: Added Display property to TWebControl (Wei)  ENH: Added TUser.getState() and setState() for storing user session data (Qiang) 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);
  			}
 @@ -185,6 +185,15 @@ class TAuthManager extends TModule  	}
  	/**
 +	 * 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.
  	 * If the application already has a non-null user, it will return without further authentication.
 | 
