Last updated March 11, 2015. Created on December 1, 2004.
Edited by hansfn, LeeHunter, Thomas_Zahreddin, AjK. Log in to edit this page.

In the default setup the Drupal login block is always displayed unless a user is logged in. This may not always be desirable. For example, if you are using Drupal to create a site that has a very small number of people actually logging into the system to create or edit content, then you probably don't want a large portion of your screen real-estate taken up with a login block that only serves a small minority of users. This also confuses the majority of your users that will not have the option to log in.

To disable the login block

  1. Go to the blocks administration page:
    • Drupal 6: Administration » Site building » Blocks
    • Drupal 7: Administration » Structure » Blocks
  2. In the Region column next to User login select None
  3. At the bottom of the page, click Save Blocks

Your regular content editors and administrators can still log in to the site by directly accessing the login page, http://www.example.com/?q=user. If you are using clean URLs, you may also use http://www.example.com/user, but remember that the ?q=user version will always work whether you have clean URLs enabled or not.

Selectively hide the login block

Since the login block is a normal block, you can configure it on the blocks administration page - use the configure link. You can set block visibility so it for example only displays on the front page.

Looking for support? Visit the Drupal.org forums, or join #drupal-support in IRC.