You are here

public function LinkedInAuthManager::getEmail in Social Auth LinkedIn 3.x

Same name and namespace in other branches
  1. 8.2 src/LinkedInAuthManager.php \Drupal\social_auth_linkedin\LinkedInAuthManager::getEmail()

Gets the email address.

Return value

string The user email address.

File

src/LinkedInAuthManager.php, line 115

Class

LinkedInAuthManager
Contains all the logic for LinkedIn OAuth2 authentication.

Namespace

Drupal\social_auth_linkedin

Code

public function getEmail() {
  return $this->client
    ->getResourceOwnerEmail($this
    ->getAccessToken());
}