You are here

public function LinkedInAuthManager::getEmail in Social Auth LinkedIn 8.2

Same name and namespace in other branches
  1. 3.x 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 105

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());
}