Skip to content

Commit

Permalink
Merge branch '2.x' of github.com:cakephp/cakephp into 2.x
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Jun 29, 2016
2 parents a366ac1 + 0e97116 commit 7626896
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Cake/Controller/Component/AuthComponent.php
Expand Up @@ -359,7 +359,7 @@ protected function _unauthenticated(Controller $controller) {
return true;
}

if (!$controller->request->is('ajax')) {
if (!$controller->request->is('ajax') && !$controller->request->is('json')) {
$this->flash($this->authError);
$this->Session->write('Auth.redirect', $controller->request->here(false));
$controller->redirect($this->loginAction);
Expand Down

0 comments on commit 7626896

Please sign in to comment.