Added support for identify:email scope.
This commit is contained in:
parent
b3660dd3a5
commit
ff5d8f8bdb
1 changed files with 4 additions and 1 deletions
|
@ -27,7 +27,10 @@ class V1UsersRoutes implements RouteHandler {
|
||||||
}
|
}
|
||||||
|
|
||||||
if($authz->isRealUser()) {
|
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))
|
if(!is_array($userInfo))
|
||||||
return 500;
|
return 500;
|
||||||
if(array_key_exists('error', $userInfo))
|
if(array_key_exists('error', $userInfo))
|
||||||
|
|
Loading…
Reference in a new issue