Skip to content

Commit

Permalink
handle user name empty values (#1292)
Browse files Browse the repository at this point in the history
  • Loading branch information
zulficarjoy authored Nov 13, 2024
1 parent 4af4929 commit a35a619
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,8 @@ protected function mapUserToObject(array $user)
{
return (new User)->setRaw($user)->map([
'id' => $user['sub'],
'nickname' => $user['name'],
'name' => $user['name'],
'nickname' => $user['name'] ?? null,
'name' => $user['name'] ?? null,
'email' => $user['emails'][0] ?? $user['email'] ?? null,
]);
}
Expand Down

0 comments on commit a35a619

Please sign in to comment.