Support the ongoing development of Laravel.io →
Fortify Jetstream Authorization
Last updated 3 months 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!

LoadForge

Your banner here too?

Moderators

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

Your logo here?

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

© 2022 Laravel.io - All rights reserved.