i have two roles in my sites and i have created a separate user registration pages for both roles with different urls.Now i want to remove the "create new account" tab in login page and i want to show "access denied" message for user who try to visit "user/register" page.i am working in Drupal 6.

I removed the 'create new account tab' in theme layer and if user try to access "user/register" means, it shows the default registration page. i want to show access denied message instead showing default registration page. is there any another method or any module for this? how can i implement it?

4 Answers 4


You can create a custom template file, i think user-register.tpl.php and put your personal message in it. This will then just show your message instead of the registration form.

  • This is handling in the presentation layer. You should actually handle it at the access control layer and hence chicagomom answer is better.
    – Gokul N K
    Feb 4, 2014 at 11:41

Under admin/user/settings, change "Public registrations" to "Only site administrators can create new user accounts."

  • i want to allow user to register by themself. i have created two type of registration pages by auto assign module.can you tell me how to remove the default registration page and show "access denied" message if anonymous user access "user/register" page ?
    – Moorthy
    Aug 17, 2011 at 11:02

I think you should use the hook_menu_alter function in a custom module.


You can change the page callback or access callback as per your requirements.


If you are interested to remove tabs, try the Tab Tamer module.

Tab Tamer is an administration utility that provides easy re-ordering, hiding, and deactivation of tabs and subtabs. You can also rename tab labels.

Tab Tamer makes use of Drupal's drag ordering, but degrades gracefully when JavaScript is disabled.

Tab Tamer utilizes Drupal's cache system to help conserve server resources.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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