You are here

public function LinkedInAuthManager::getEmailAddress in Open Social 8.7

Same name and namespace in other branches
  1. 8.9 modules/custom/social_auth_linkedin/src/LinkedInAuthManager.php \Drupal\social_auth_linkedin\LinkedInAuthManager::getEmailAddress()
  2. 8.8 modules/custom/social_auth_linkedin/src/LinkedInAuthManager.php \Drupal\social_auth_linkedin\LinkedInAuthManager::getEmailAddress()

File

modules/custom/social_auth_linkedin/src/LinkedInAuthManager.php, line 150

Class

LinkedInAuthManager
Class LinkedInAuthManager.

Namespace

Drupal\social_auth_linkedin

Code

public function getEmailAddress() {
  if (!empty($this->profile['email_information']['elements'])) {
    return $this->profile['email_information']['elements'][0]['handle~']['emailAddress'];
  }
}