fix: [internal] AppController minor fix

- fix bug of invalid forcing of JSON export type in certain conditions
pull/3626/head
iglocska 2018-09-03 17:46:35 +02:00
parent 141c7d451f
commit 6850d7dff3
1 changed files with 1 additions and 1 deletions

View File

@ -559,6 +559,7 @@ class AppController extends Controller
);
return false;
}
$key = 'json';
} else {
if (!$this->Auth->user('id')) {
$exception = $this->RestResponse->throwException(
@ -569,7 +570,6 @@ class AppController extends Controller
}
$user = $this->Auth->user();
}
$key = 'json';
return $user;
}