0

Only users who paid can finish registration and they get a role applied to their user.

Problem is that, users can still register through default registration form.

Disabling registration for in Account settings will disable the registration globally everywhere?

How to disable it only in /user/register? But allow during commerce module checkout process?

3

You can do that with hook_menu_alter() by changing the access for that path:

function MYMODULE_menu_alter(&$items) {
  $items['user/register']['access callback'] = FALSE;
}
  • Worked. Except used inside theme's template.php, not separate module. – user3108268 Dec 13 '17 at 19: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.