How To Create User Registration Section In Website, In Which The Registered User Will Be Activated By Admin Of The Site

I want to create a user registration section in my project in which a user can register himself by providing user_name, email, password and repeat password. I have already set the form for registration providing user_name, email, password and repeat password. but I want that the new users should be confirmed or rejected by the Admin of the site from backend, just like in comment that the admin approve or reject the newly posted comments.

If anyone knows the answer then please share.

I have searched the topic but not found any wiki or solution. If anyone knows some linke regarding this, then please share.

Thanks in advance.

  • Add an attribute like ‘active’ to your user model

    or ‘state’ for different user states (disabled, active, need_email_confirmation …)

  • Assign active=false on registration

  • Allow only ‘active’ users or ‘state’=… to login

  • Allow the admin to update the user

    ‘active’ -> checkbox or ‘state’ -> dropdownlist