F
Filament4mo ago
Sivan

How to setup active and inactive under user

Hi Channel, How can I set up active and inactive status for a user? I want to create a user with active and in-active. because only active users can log in, and if the user is inactive, it should display a "contact admin" message. How can I achieve this in Filament? Any help would be appreciated.
4 Replies
Dennis Koch
Dennis Koch4mo ago
Probably same as you would with default Laravel install: Add a middleware that redirects inactive users to an info page. Same as email verification etc does
Sivan
SivanOP4mo ago
@Dennis Koch, Thanks for reply, But i want in this condition checking in admin login When the admin creates a user and assigns roles and permissions, the user can log in and perform operations in the admin panel. However, if the super admin later deactivates the user, the user should receive a message like "Your account is locked" when trying to log in.
Dennis Koch
Dennis Koch4mo ago
Yes. That's totally possible with a middleware. If you just want to show a message instead of showing a dedicated page, you can overwrite the Login component
Sivan
SivanOP4mo ago
Okay @Dennis Koch, I will check on this
Want results from more Discord servers?
Add your server