change google OAuth response
This commit is contained in:
@ -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