removing create new account tab from login page in drupal 7
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开发者_JAVA技巧 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?
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.
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.
The Tab Tamer module will do this. Just make sure you choose hidden and not disabled, otherwise users will get access denied errors.
Home>administration>configuration>people> who can register accounts> select administrators only
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.
精彩评论