Correcting return value for Auth::redirect(), fixes #5893

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7930 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
nate 2008-12-17 07:30:55 +00:00
parent e9bd7aea6a
commit 3129d5411f

View file

@ -673,9 +673,8 @@ class AuthComponent extends Object {
*/
function redirect($url = null) {
if (!is_null($url)) {
return $this->Session->write('Auth.redirect', $url);
}
if ($this->Session->check('Auth.redirect')) {
$this->Session->write('Auth.redirect', $url);
} elseif ($this->Session->check('Auth.redirect')) {
$redir = $this->Session->read('Auth.redirect');
$this->Session->delete('Auth.redirect');