mirror of
https://github.com/appwrite/appwrite
synced 2026-05-24 09:28:40 +00:00
fix getUser method
This commit is contained in:
parent
7819b19d1c
commit
104f976f1b
1 changed files with 2 additions and 5 deletions
|
|
@ -206,16 +206,13 @@ class Dailymotion extends OAuth2
|
||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
protected function getUser(string $accessToken) : array
|
protected function getUser(string $accessToken): array
|
||||||
{
|
{
|
||||||
if (empty($this->user)) {
|
if (empty($this->user)) {
|
||||||
$user = $this->request(
|
$user = $this->request(
|
||||||
'GET',
|
'GET',
|
||||||
$this->endpoint . '/user/me?',
|
$this->endpoint . '/user/me?fields=' . \implode(',', $this->getFields()),
|
||||||
['Authorization: Bearer ' . \urlencode($accessToken)],
|
['Authorization: Bearer ' . \urlencode($accessToken)],
|
||||||
\http_build_query([
|
|
||||||
'fields' => \implode(' ', $this->getFields())
|
|
||||||
])
|
|
||||||
);
|
);
|
||||||
$this->user = \json_decode($user, true);
|
$this->user = \json_decode($user, true);
|
||||||
\var_dump($this->user);
|
\var_dump($this->user);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue