Skip to content

Commit 2b8056b

Browse files
authored
🐛 fix error on name when create user with github (#92)
1 parent cb79cb9 commit 2b8056b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/Models/User.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ public static function findOrCreateSocialUserProvider($socialUser, string $provi
202202

203203
if (! $user) {
204204
$user = self::create([
205-
'name' => $socialUser->getName(),
205+
'name' => $socialUser->getName() ?? $socialUser->getNickName() ?? $socialUser->getId(),
206206
'email' => $socialEmail,
207207
'username' => $socialUser->getNickName() ?? $socialUser->getId(),
208208
'github_profile' => $provider === 'github' ? $socialUser->getNickName() : null,

0 commit comments

Comments
 (0)