From 104f976f1bedde4706d9cdd96374bae6f65f0db6 Mon Sep 17 00:00:00 2001 From: Bishwajeet Parhi Date: Sun, 12 Jun 2022 07:16:01 +0000 Subject: [PATCH] fix getUser method --- src/Appwrite/Auth/OAuth2/Dailymotion.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/Appwrite/Auth/OAuth2/Dailymotion.php b/src/Appwrite/Auth/OAuth2/Dailymotion.php index 0b6e7c1479..e57ef1bd3b 100644 --- a/src/Appwrite/Auth/OAuth2/Dailymotion.php +++ b/src/Appwrite/Auth/OAuth2/Dailymotion.php @@ -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);