fix: [API] downloadAttachment API user object fetching fixed

- user is already in session, just reuse it
pull/8035/head
iglocska 2021-12-07 18:14:12 +01:00
parent b869ff9154
commit a546fc7919
No known key found for this signature in database
GPG Key ID: BEA224F1FEF113AC
1 changed files with 1 additions and 1 deletions

View File

@ -1740,7 +1740,7 @@ class AttributesController extends AppController
if (!$this->Auth->user()) {
throw new UnauthorizedException(__('You are not authorized. Please send the Authorization header with your auth key along with an Accept header for application/xml.'));
}
$user = $this->_checkAuthUser($this->Auth->user('authkey'));
$user = $this->Auth->user();
}
// if the user is authorised to use the api key then user will be populated with the user's account
// in addition we also set a flag indicating whether the user is a site admin or not.