Skip to content

Commit c72ecf7

Browse files
committed
user access
1 parent 720522e commit c72ecf7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Discord/Endpoints/OAuth2Endpoint.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,12 @@ private function get(
118118
$OAA->removeToken($response, $headers, $body);
119119
return;
120120
}
121+
if (isset($params['user']) && $OAA->isAuthed()) {
122+
$response = Response::STATUS_OK;
123+
$headers = ['Content-Type' => 'application/json'];
124+
$body = json_encode($OAA->getUser());
125+
return;
126+
}
121127
}
122128

123129
/**

0 commit comments

Comments
 (0)