Provider/FacebookProvider.php 1 location
|
@@ 59-71 (lines=13) @@
|
56 |
|
* |
57 |
|
* @return UserDto |
58 |
|
*/ |
59 |
|
public function getUser($code) |
60 |
|
{ |
61 |
|
$accessToken = $this->getAccessToken($code); |
62 |
|
$userInformation = $this->getUserInformation($accessToken); |
63 |
|
|
64 |
|
$user = new UserDto(); |
65 |
|
$user->socialId = $userInformation->id; |
66 |
|
$user->email = $userInformation->email ?: null; |
67 |
|
$user->firstName = $userInformation->first_name ?: null; |
68 |
|
$user->lastName = $userInformation->last_name ?: null; |
69 |
|
|
70 |
|
return $user; |
71 |
|
} |
72 |
|
} |
73 |
|
|
Provider/VkProvider.php 1 location
|
@@ 61-73 (lines=13) @@
|
58 |
|
* |
59 |
|
* @return UserDto |
60 |
|
*/ |
61 |
|
public function getUser($code) |
62 |
|
{ |
63 |
|
$accessToken = $this->getAccessToken($code); |
64 |
|
$userInformation = $this->getUserInformation($accessToken); |
65 |
|
|
66 |
|
$user = new UserDto(); |
67 |
|
$user->socialId = $userInformation->uid; |
68 |
|
$user->email = $userInformation->email ?: null; |
69 |
|
$user->firstName = $userInformation->first_name ?: null; |
70 |
|
$user->lastName = $userInformation->last_name ?: null; |
71 |
|
|
72 |
|
return $user; |
73 |
|
} |
74 |
|
} |
75 |
|
|