mirror of
https://github.com/appwrite/appwrite
synced 2026-05-23 08:58:35 +00:00
tiny code quality
This commit is contained in:
parent
d96be650e4
commit
68616957ab
1 changed files with 5 additions and 5 deletions
|
|
@ -80,7 +80,7 @@ class Disqus extends OAuth2
|
|||
{
|
||||
$user = $this->getUser($accessToken);
|
||||
|
||||
$userId = $user['response']['id'];
|
||||
$userId = $user['id'];
|
||||
|
||||
return $userId;
|
||||
}
|
||||
|
|
@ -89,7 +89,7 @@ class Disqus extends OAuth2
|
|||
{
|
||||
$user = $this->getUser($accessToken);
|
||||
|
||||
$userEmail = $user['response']['email'];
|
||||
$userEmail = $user['email'];
|
||||
|
||||
return $userEmail;
|
||||
}
|
||||
|
|
@ -101,7 +101,7 @@ class Disqus extends OAuth2
|
|||
// Look out for the change in their enpoint.
|
||||
// It's in Beta so they may provide a parameter in the future.
|
||||
// https://disqus.com/api/docs/users/details/
|
||||
// $isVerified = $user['response']['isAnonymous'];
|
||||
// $isVerified = $user['isAnonymous'];
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
@ -110,7 +110,7 @@ class Disqus extends OAuth2
|
|||
{
|
||||
$user = $this->getUser($accessToken);
|
||||
|
||||
$username = $user['response']['name'] ?? '';
|
||||
$username = $user['name'] ?? '';
|
||||
|
||||
return $username;
|
||||
}
|
||||
|
|
@ -126,7 +126,7 @@ class Disqus extends OAuth2
|
|||
'api_secret' => $this->appSecret
|
||||
]),
|
||||
);
|
||||
$this->user = \json_decode($user, true);
|
||||
$this->user = \json_decode($user, true)['response'];
|
||||
}
|
||||
|
||||
return $this->user;
|
||||
|
|
|
|||
Loading…
Reference in a new issue