I want to disable user registration for specified domain, how I can achieve that?
Is there any domain module that will do this?

Comments

agentrickard’s picture

Nope. You need a custom module.

You can either force users to another domain using domain_goto() or manipulate the form submission so that users's are not assigned to a certain domain.

kenorb’s picture

Category: support » feature
Status: Active » Fixed

Currently I've done it by following init function:

/**
 * Implementation of hook_init().
 */
function hook_init() {
  global $_domain;
  if (($_domain['domain_id'] == 2 || $_domain['domain_id'] == 3) && arg(0) == 'user' && arg(1) == 'register') {
    drupal_access_denied();
    exit;
  }

where domain_id is specified domain where you want to disable registration form.
Unless there will be some custom module which will provides this functionality.

bisonte_biscottato’s picture

StatusFileSize
new900 bytes

I make a stupid module to make this function. It's my first module, so be patient....:)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.