From 7d66e995c361955517c56e19c69c5db599b6e5f3 Mon Sep 17 00:00:00 2001 From: wess Date: Fri, 11 Mar 2022 09:09:48 -0500 Subject: [PATCH] getUser and related, temp, respond empty --- src/Appwrite/Auth/OAuth2/etsy.php | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/src/Appwrite/Auth/OAuth2/etsy.php b/src/Appwrite/Auth/OAuth2/etsy.php index 73e13c6dfb..82b3ce2c78 100644 --- a/src/Appwrite/Auth/OAuth2/etsy.php +++ b/src/Appwrite/Auth/OAuth2/etsy.php @@ -164,12 +164,6 @@ class Notion extends OAuth2 */ public function getUserEmail(string $accessToken):string { - $response = $this->getUser($accessToken); - - if(isset($response['bot']['owner']['user']['person']['email'])){ - return $response['bot']['owner']['user']['person']['email']; - } - return ''; } @@ -180,12 +174,6 @@ class Notion extends OAuth2 */ public function getUserName(string $accessToken):string { - $response = $this->getUser($accessToken); - - if (isset($response['bot']['owner']['user']['name'])) { - return $response['bot']['owner']['user']['name']; - } - return ''; } @@ -196,15 +184,6 @@ class Notion extends OAuth2 */ protected function getUser(string $accessToken) { - $headers = [ - 'Notion-Version: ' . $this->version, - 'Authorization: Bearer '.\urlencode($accessToken) - ]; - - if (empty($this->user)) { - $this->user = \json_decode($this->request('GET', $this->endpoint . '/users/me', $headers), true); - } - return $this->user; } }