Support the ongoing development of Laravel.io →
Fortify Jetstream Authorization
Last updated 2 years ago.
0

Hey,

one way to do this:

First, to not send the verification e-mail you can remove the SendEmailVerificationNotification::class, entry from the App\Providers\EventServiceProvider class.

After that you can create a new listener eg. SendEmailConfirmationOnRoleAssignmentListener and listen to the Laravel\Jetstream\Events\TeamMemberUpdated event. In that listener you check if the user got the desired role assigned and if the user account isn't already confirmed. If both is correct, you send the email verification using $user->sendEmailVerificationNotification();. Done!

0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.