2

I have set up a public registration form simply using the User registration form: https://craftcms.com/docs/templating/user-registration-form

Is there a way to set it so that when users register they need to be activated by an admin account?

Currently when they register they get an email to verify email address and when they do they get activated. If I turn off verify email addresses in user settings they simple get activated automatically.

2 Answers 2

2

You could do this in a plugin by listening for some user-related events. In particular, onBeforeActivateUser, where you could cancel user activation by setting $event->performAction = false;

2
3

Some sort of workaround

  • You can make a register user group with no permissions.
  • Than add another group with the permissions you want.

After registration, the admin can put a new user to the new group.

2
  • Thanks but not sure if it will work in this case. the Login is basically to access the whole front end of the site - so once activated they can get in. Unless the login script can only grant access to specific user groups?
    – mmc501
    Dec 11, 2014 at 15:58
  • @mmc501 you can always add another conditional to your template to check for the user's group before giving access.
    – carlcs
    Feb 9, 2015 at 12:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.