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
|
# CHANGELOG
|
||||||
- Fix #307: Fix French translation (arollmann)
|
- Fix #307: Fix French translation (arollmann)
|
||||||
|
- Fix #316: Fix New Response from Google OAuth Api
|
||||||
|
|
||||||
## 1.5.0 April 19, 2019
|
## 1.5.0 April 19, 2019
|
||||||
- Fix: Fix condition in EmailChangeService (it was always false) (borisaeric)
|
- Fix: Fix condition in EmailChangeService (it was always false) (borisaeric)
|
||||||
|
|||||||
@ -21,9 +21,14 @@ class Google extends BaseGoogle implements AuthClientInterface
|
|||||||
*/
|
*/
|
||||||
public function getEmail()
|
public function getEmail()
|
||||||
{
|
{
|
||||||
return isset($this->getUserAttributes()['emails'][0]['value'])
|
$userAttributes = $this->getUserAttributes();
|
||||||
? $this->getUserAttributes()['emails'][0]['value']
|
if (isset($userAttributes['emails']) && isset($userAttributes['emails'][0]['value'])) {
|
||||||
: null;
|
return $userAttributes['emails'][0]['value'];
|
||||||
|
} elseif (isset($userAttributes['email'])) {
|
||||||
|
return $userAttributes['email'];
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user