Merge pull request #318 from Julian-B90/new-response-from-google-api
New response from google api
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
# CHANGELOG
|
||||
- Fix #307: Fix French translation (arollmann)
|
||||
- Fix #316: Fix New Response from Google OAuth Api
|
||||
|
||||
## 1.5.0 April 19, 2019
|
||||
- Fix: Fix condition in EmailChangeService (it was always false) (borisaeric)
|
||||
|
||||
@ -21,9 +21,14 @@ class Google extends BaseGoogle implements AuthClientInterface
|
||||
*/
|
||||
public function getEmail()
|
||||
{
|
||||
return isset($this->getUserAttributes()['emails'][0]['value'])
|
||||
? $this->getUserAttributes()['emails'][0]['value']
|
||||
: null;
|
||||
$userAttributes = $this->getUserAttributes();
|
||||
if (isset($userAttributes['emails']) && isset($userAttributes['emails'][0]['value'])) {
|
||||
return $userAttributes['emails'][0]['value'];
|
||||
} elseif (isset($userAttributes['email'])) {
|
||||
return $userAttributes['email'];
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user