You are here

public function GoogleAuthManager::getUserInfo in Social Auth Google 8.2

Same name and namespace in other branches
  1. 8 src/GoogleAuthManager.php \Drupal\social_auth_google\GoogleAuthManager::getUserInfo()
  2. 3.x src/GoogleAuthManager.php \Drupal\social_auth_google\GoogleAuthManager::getUserInfo()

File

src/GoogleAuthManager.php, line 52

Class

GoogleAuthManager
Contains all the logic for Google OAuth2 authentication.

Namespace

Drupal\social_auth_google

Code

public function getUserInfo() {
  if (!$this->user) {
    $this->user = $this->client
      ->getResourceOwner($this
      ->getAccessToken());
  }
  return $this->user;
}