Added support for identify:email scope.

This commit is contained in:
flash 2024-11-21 20:07:42 +00:00
parent b3660dd3a5
commit ff5d8f8bdb

View file

@ -27,7 +27,10 @@ class V1UsersRoutes implements RouteHandler {
}
if($authz->isRealUser()) {
$userInfo = $this->rpc->query('getUser', ['userId' => $authz->getUserId()]);
$userInfo = $this->rpc->query('getUser', [
'userId' => $authz->getUserId(),
'includeEMailAddress' => $authz->hasScope('identify:email'),
]);
if(!is_array($userInfo))
return 500;
if(array_key_exists('error', $userInfo))