1
0
Fork 0
mirror of synced 2024-06-29 11:40:45 +12:00

fix getUser method

This commit is contained in:
Bishwajeet Parhi 2022-06-12 07:16:01 +00:00
parent 7819b19d1c
commit 104f976f1b

View file

@ -206,16 +206,13 @@ class Dailymotion extends OAuth2
*
* @return array
*/
protected function getUser(string $accessToken) : array
protected function getUser(string $accessToken): array
{
if (empty($this->user)) {
$user = $this->request(
'GET',
$this->endpoint . '/user/me?',
$this->endpoint . '/user/me?fields=' . \implode(',', $this->getFields()),
['Authorization: Bearer ' . \urlencode($accessToken)],
\http_build_query([
'fields' => \implode(' ', $this->getFields())
])
);
$this->user = \json_decode($user, true);
\var_dump($this->user);