atom
atom
FFilament
Created by atom on 1/12/2024 in #❓┊help
Implement Pending Approval Page For Newly Signed up Users
Hi guys, I have been working diligently on the implementation of a feature that will display a pending approval page whenever a new user signs up and then notify the admin of a newly signed up user. The aim is to enhance the onboarding process and introduce an approval step before users are allowed access to the dashboard. As you might've guessed, I have two panels readily configured: one for the admin user and the other for the regular user. I've gone through the docs in search of a clue that'll help with this, but unfortunately, couldn't find one that helps. ADDITIONAL INFORMATION: To achieve this, I've added a "user_approved_at" column in the Users table which is false by default. The idea is to set it to true once an admin approves the new user... and until a user is approved would he gain access to the user's dashboard. This will be some sort of middleware actively checking if the user attempting to login has his "user_approved_at" set to true, if not, he keeps getting an unauthorized message saying that "Your request is currently being reviewed by the administrators. Kindly keep an eye on your email". CHALLENGE: I'm struggling with how to achieve the "Pending approval" page after user registration without redirecting them to the dashboard automatically. Please help.
23 replies