11
votes

Drupal login page, while going from url ?q=user shows you login form and it also shows Change password and Create new account tabs . I want to remove the Create new account option/tab from there and also I do not want user to access registration page even via url: ?q=user/register.

Anyone?

5

5 Answers

14
votes

To hide the Create new account tab in the /user path, you can insert the following in your module code:

function modulename_menu_alter(&$item) {
  // Hide the "Create new account" tab
  $item['user/register']['type'] = MENU_CALLBACK;
}

This hides the tab but still allows for /user/register to be accessed.

10
votes

Open the Configuration admin menu, and under the People heading click Account Settings. Under the heading Who can register accounts? select Administrators only and then save the settings.

3
votes

The Tab Tamer module will do this. Just make sure you choose hidden and not disabled, otherwise users will get access denied errors.

2
votes

Home>administration>configuration>people> who can register accounts> select administrators only

0
votes

To remove the "Register Tab" in login page for visitors, go to Administration>>Account Settings>> select the administrator to create the account. Save the changes. By doing this, only "Admin" can create the accounts. Users cannot see the "Register" Tab.