Merge branch '2.x' of github.com:cakephp/cakephp into 2.x

This commit is contained in:
mark_story 2016-06-28 22:07:44 -04:00
commit 7626896286

View file

@ -359,7 +359,7 @@ class AuthComponent extends Component {
return true; return true;
} }
if (!$controller->request->is('ajax')) { if (!$controller->request->is('ajax') && !$controller->request->is('json')) {
$this->flash($this->authError); $this->flash($this->authError);
$this->Session->write('Auth.redirect', $controller->request->here(false)); $this->Session->write('Auth.redirect', $controller->request->here(false));
$controller->redirect($this->loginAction); $controller->redirect($this->loginAction);