Skip to content

Commit

Permalink
[OAuth2] Feature: Provider/LinkedIn - mark emailVerified (tested) #97
Browse files Browse the repository at this point in the history
  • Loading branch information
ovr committed Oct 14, 2019
1 parent aeddc7c commit 497b308
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/OAuth2/Provider/LinkedIn.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ protected function fetchPrimaryEmail(AccessTokenInterface $accessToken, User $us
$element = array_shift($response['elements']);
if ($element && isset($element['handle~']) && isset($element['handle~']['emailAddress'])) {
$user->email = $element['handle~']['emailAddress'];
// Tested on my user, I've got two emails and linkedin return only primary and it's verified
$user->emailVerified = true;
}
}
}
Expand Down

0 comments on commit 497b308

Please sign in to comment.