Skip to content

Commit

Permalink
Fixed of the requesting user data. Passing parameters was skipped. Al…
Browse files Browse the repository at this point in the history
…so added the email field.
  • Loading branch information
dmitrymenshikov authored and ovr committed Nov 23, 2020
1 parent 71c2236 commit 2f8fbe3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/OAuth2/Provider/Odnoklassniki.php
Expand Up @@ -88,14 +88,15 @@ public function getIdentity(AccessTokenInterface $accessToken)

$parameters['sig'] = $this->makeSecureSignature($parameters, $accessToken);

$response = $this->request('GET', 'users/getCurrentUser', [], $accessToken);
$response = $this->request('GET', 'users/getCurrentUser', $parameters, $accessToken);

$hydrator = new ArrayHydrator([
'uid' => 'id',
'first_name' => 'firstname',
'last_name' => 'lastname',
'name' => 'fullname',
'pic_3' => 'pictureURL'
'pic_3' => 'pictureURL',
'email' => 'email'
]);

return $hydrator->hydrate(new User(), $response);
Expand Down

0 comments on commit 2f8fbe3

Please sign in to comment.