Skip to content

Commit

Permalink
If GitHub user has no name, use username
Browse files Browse the repository at this point in the history
  • Loading branch information
mattstauffer committed Jun 6, 2024
1 parent a9e4d86 commit e349405
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/Http/Controllers/Auth/LoginController.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public function handleProviderCallback()
}
} else {
$newUser = User::create([
'name' => $user->getName(),
'name' => $user->getName() ?: $user->getNickName(),
'email' => $user->getEmail(),
'github_username' => $user->getNickname(),
'github_avatar' => $user->getAvatar(),
Expand Down

0 comments on commit e349405

Please sign in to comment.