From e24b44e266e359dbb3e46d4e244431e89a70d2b6 Mon Sep 17 00:00:00 2001 From: nate Date: Tue, 20 Feb 2007 17:45:41 +0000 Subject: [PATCH] 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 --- cake/libs/controller/components/auth.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cake/libs/controller/components/auth.php b/cake/libs/controller/components/auth.php index b6b5918ca..80912fb7c 100644 --- a/cake/libs/controller/components/auth.php +++ b/cake/libs/controller/components/auth.php @@ -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; }