Skip to content

Commit

Permalink
fix: dispatch registered event after socialusercreated
Browse files Browse the repository at this point in the history
  • Loading branch information
audunru committed Aug 25, 2024
1 parent baba7b9 commit 821b191
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Traits/FindsAndCreatesUsers.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ private function createUser(string $provider, ProviderUser $providerUser): User
'name' => $providerUser->getName(),
]);

event(new Registered($user));

$socialAccount = $this->makeSocialAccount($provider, $providerUser->getId());
$user->addSocialAccount($socialAccount);

event(new SocialUserCreated($user, $socialAccount, $providerUser));
event(new Registered($user));

return $user;
}
Expand Down

0 comments on commit 821b191

Please sign in to comment.