Merge pull request #9042 from gestudio/patch-1

Issue #9040 - Auth saving json in Auth.redirect
This commit is contained in:
Mark Story 2016-06-27 21:48:56 -04:00 committed by GitHub
commit 0e97116093

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);