Skip to content

Commit

Permalink
[OAuth2/Provider] Feature: Bitbucket - hydrate pictureURL by static +…
Browse files Browse the repository at this point in the history
… username
  • Loading branch information
ovr committed May 5, 2018
1 parent ade7d63 commit 4cf77c3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/OAuth2/Provider/Bitbucket.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@ public function getIdentity(AccessTokenInterface $accessToken)
]
);

return $hydrator->hydrate(new User(), $result);
/** @var User $user */
$user = $hydrator->hydrate(new User(), $result);
$user->pictureURL = "https://bitbucket.org/account/{$user->username}/avatar/512/";

return $user;
}
}

0 comments on commit 4cf77c3

Please sign in to comment.