I am building a site in which user accounts matter only to provide the authenticated / not authenticated information. I created a custom login block that is always displayed (in the header of the website). I want to reach the following two points:

  • Since user profiles are not needed, I want to disable them for usability reasons. The users should, after login, be redirected to the landing page of my website.
  • Also, I want to disable the dedicated login page that appears, i.e., upon entering the wrong password.

Is there any easy way to do these things?

1 Answer 1


Yes, you can change built in menu / page callbacks with hook_menu_alter

For example, alter user_menu

 * Implements hook_menu_alter
function MYMODULE_menu_alter(&$items){
  // Go to front page when visiting /user and /user/login
  $items['user']['page callback'] = 'drupal_goto';

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.