public function GoogleAuthManager::getProfile in Open Social 8.5
Same name and namespace in other branches
- 8.9 modules/custom/social_auth_google/src/GoogleAuthManager.php \Drupal\social_auth_google\GoogleAuthManager::getProfile()
- 8 modules/custom/social_auth_google/src/GoogleAuthManager.php \Drupal\social_auth_google\GoogleAuthManager::getProfile()
- 8.2 modules/custom/social_auth_google/src/GoogleAuthManager.php \Drupal\social_auth_google\GoogleAuthManager::getProfile()
- 8.3 modules/custom/social_auth_google/src/GoogleAuthManager.php \Drupal\social_auth_google\GoogleAuthManager::getProfile()
- 8.4 modules/custom/social_auth_google/src/GoogleAuthManager.php \Drupal\social_auth_google\GoogleAuthManager::getProfile()
- 8.6 modules/custom/social_auth_google/src/GoogleAuthManager.php \Drupal\social_auth_google\GoogleAuthManager::getProfile()
- 8.7 modules/custom/social_auth_google/src/GoogleAuthManager.php \Drupal\social_auth_google\GoogleAuthManager::getProfile()
- 8.8 modules/custom/social_auth_google/src/GoogleAuthManager.php \Drupal\social_auth_google\GoogleAuthManager::getProfile()
Returns object of a user profile.
Return value
mixed Returns the profile.
Overrides AuthManagerInterface::getProfile
File
- modules/
custom/ social_auth_google/ src/ GoogleAuthManager.php, line 70
Class
- GoogleAuthManager
- Class GoogleAuthManager.
Namespace
Drupal\social_auth_googleCode
public function getProfile() {
if (empty($this->googleService)) {
$this->googleService = new \Google_Service_Oauth2($this->sdk);
}
$this->profile = $this->googleService->userinfo
->get();
return $this->profile;
}