close #321 fix linked in response

This commit is contained in:
tonydspaniard
2019-06-26 09:15:38 +02:00
parent dd407f50b4
commit e5267510b0
2 changed files with 13 additions and 4 deletions

View File

@ -1,6 +1,7 @@
# CHANGELOG
- Fix #307: Fix French translation (arollmann)
- Fix #316: Fix New Response from Google OAuth Api
- Fix #316: Fix new response from Google OAuth Api (Julian-B90)
- Fix #321: Fix new response from LinkedIn OAuth Api (tonydspaniard)
## 1.5.0 April 19, 2019
- Fix: Fix condition in EmailChangeService (it was always false) (borisaeric)

View File

@ -21,9 +21,17 @@ class LinkedIn extends BaseLinkedIn implements AuthClientInterface
*/
public function getEmail()
{
return isset($this->getUserAttributes()['email-address'])
? $this->getUserAttributes()['email-address']
: null;
$userAttributes = $this->getUserAttributes();
if (isset($userAttributes['email-address'])) {
return $userAttributes['email-address'];
}
if (isset($userAttributes['email'])) {
return $userAttributes['email'];
}
return null;
}
/**