mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Implement getUser method
This commit is contained in:
@@ -153,7 +153,12 @@ class Line extends OAuth2
|
||||
*/
|
||||
protected function getUser(string $accessToken): array
|
||||
{
|
||||
if (empty($this->user)) {
|
||||
$headers = ['Authorization: Bearer ' . \urlencode($accessToken)];
|
||||
$user = $this->request('GET', 'https://api.line.me/v2/profile', $headers);
|
||||
$this->user = \json_decode($user, true);
|
||||
}
|
||||
|
||||
return [];
|
||||
return $this->user;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user