diff --git a/src/V1/V1UsersRoutes.php b/src/V1/V1UsersRoutes.php index 2f2ebbe..51b10d0 100644 --- a/src/V1/V1UsersRoutes.php +++ b/src/V1/V1UsersRoutes.php @@ -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))