Fixing AuthComponent::redirect() to redirect back to $loginRedirect instead of $loginAction

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4544 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
nate 2007-02-20 17:45:41 +00:00
parent b82cf78964
commit e24b44e266

View file

@ -519,6 +519,10 @@ class AuthComponent extends Object {
if ($this->Session->check('Auth.redirect')) {
$redir = $this->Session->read('Auth.redirect');
$this->Session->delete('Auth.redirect');
if ($this->_normalizeURL('/' . $redir) == $this->_normalizeURL($this->loginAction)) {
$redir = $this->loginRedirect;
}
} else {
$redir = $this->loginRedirect;
}