You are here

public function Oauth2Client::getUser in Auth0 Single Sign On 8.2

Requests user info to Auth0 server.

Return value

array

Throws

ApiException

File

vendor/auth0/auth0-php/src/API/Oauth2Client.php, line 325

Class

Oauth2Client
This class provides access to Auth0 Platform.

Namespace

Auth0\SDK\API

Code

public function getUser() {

  // Ensure we have the user info
  if ($this->user === null) {
    $this
      ->exchangeCode();
  }
  if (!is_array($this->user)) {
    return null;
  }
  return $this->user;
}