Fix bug when id and email was set to null even if they're was in user response
This commit is contained in:
@@ -167,8 +167,8 @@ class Vkontakte extends AbstractProvider
|
|||||||
{
|
{
|
||||||
$response = reset($response['response']);
|
$response = reset($response['response']);
|
||||||
$additional = $token->getValues();
|
$additional = $token->getValues();
|
||||||
$response['email'] = !empty($additional['email']) ? $additional['email'] : null;
|
if (!empty($additional['email'])) $response['email'] = $additional['email'];
|
||||||
$response['id'] = !empty($additional['user_id']) ? $additional['user_id'] : null;
|
if (!empty($additional['user_id'])) $response['id'] = $additional['user_id'];
|
||||||
|
|
||||||
return new User($response, $response['id']);
|
return new User($response, $response['id']);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user