From ce2e60f34a898f6265eed10f8d836e5e7f7b026b Mon Sep 17 00:00:00 2001 From: Vincent Auger Date: Wed, 22 May 2024 16:23:27 -0300 Subject: [PATCH] feat: Associate author role with user upon registration (#636) --- app/Http/Controllers/Auth/RegisteredUserController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/Auth/RegisteredUserController.php b/app/Http/Controllers/Auth/RegisteredUserController.php index 4341625a..d9e8ca8d 100644 --- a/app/Http/Controllers/Auth/RegisteredUserController.php +++ b/app/Http/Controllers/Auth/RegisteredUserController.php @@ -62,8 +62,8 @@ public function store(Request $request): JsonResponse } $user->email_verification_token = User::generateEmailVerificationToken(); - $user->associateAuthor(); $user->save(); + $user->associateAuthor(); // give the user the author role - this is the default role $user->assignRole('author');