chg: [API] legacy passing of the api key via URL parameters caused an invalid response type

- automatically selects json now
pull/3608/head
iglocska 2018-09-03 10:07:47 +02:00
parent 630a1a0150
commit 69b1b741b6
1 changed files with 2 additions and 1 deletions

View File

@ -547,7 +547,7 @@ class AppController extends Controller
return $this->Auth->user('org_id');
}
protected function _getApiAuthUser($key, &$exception)
protected function _getApiAuthUser(&$key, &$exception)
{
if (strlen($key) == 40) {
// check if the key is valid -> search for users based on key
@ -569,6 +569,7 @@ class AppController extends Controller
}
$user = $this->Auth->user();
}
$key = 'json';
return $user;
}