Accessing Drupal's Login Page After You Have Already Disabled The User Login Block

Thursday, September 27th, 2007

Drupal is big on user community. By default, a fresh installation of Drupal plops a user login block in the left navigation column. But maybe you're just getting started with a new site and you don't want to look pretentious talking about "users" when in fact you are the only one using the site.

Well, turning off the user login block is easy. As with any block, you can disable it via Administer->Site Building->Blocks. However, once you've disabled the block for the general public, you will still want to log in. Now what?

To get a login page, browse to the root of your Drupal installation and add "?q=user" to the end of the URL:

http://www.somesite.com/?q=user

or

http://www.somesite.com/install_directory/?q=user

P.S. Here's to hoping that your site gets big enough that you want to turn the login box back on!!!

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • bodytext
  • del.icio.us
  • Reddit
  • Slashdot
  • Technorati
  • description
  • NewsVine
  • StumbleUpon
  • E-mail this story to a friend!
  • Sphinn

13 Responses - Join the Conversation to “Accessing Drupal's Login Page After You Have Already Disabled The User Login Block”

  1. Cliff Says:

    Thanks. You’re a lifesaver. I was really worried when I realized I changed all my pages from published to unpublished and found out the login page I had created was something I needed.

  2. jamiegrove Says:

    That freaked me out too! Glad I could help, Cliff!

  3. Margaret Says:

    I knew I’d read about this somewhere, but when I tried to look it up at drupal.org and then Google it, I had a heck of a time finding this info.

    May you get lots of traffic for writing this!

    Cheers!
    Margaret

  4. felix Says:

    Thank you for this tip.

  5. elisa Says:

    thank you very much!!!!!!

  6. jamiegrove Says:

    Non c’รจ di che, Elisa! :)

  7. Chris Says:

    This doesn’t seem to work if you have short URLs enabled. You’ll just get the generic “Page Not Found” error.

  8. jamiegrove Says:

    Hi, Chris.

    If you have clean URLs enabled, you can use:

    http://www.somesite.com/user

  9. jenny Says:

    Hi, I just got drupal installed, and it is not allowing me to login as administrator. So basically, I am locked out of my own site. When I request a new password it still does not work, and I get the Page Not Found error. Help!

  10. jamiegrove Says:

    Hi, Jenny.

    If you have database access, you can reset the password manually. The link below has a good discussion of how to do it.

    http://drupal.org/node/32650

  11. jenny Says:

    O, thank you soooooooooooooooooo much. Wow, I really appreciate it. :D

  12. jenny Says:

    Hmmmm…it worked and then reverted. So I was able to edit and sign into my site as admin, and then when it kept requesting me to sign in again and again I went back to the database and the password was reset to the default. Everytime I try to change it again it just reverts back. Seems strange.

  13. jamiegrove Says:

    @Jenny That does seem pretty odd. Once you log in, try changing the password through the Drupal admin itself before doing anything else. If you already tried that, perhaps there is a module interfering?

    I know the SMFforum module has caused problems for some people. From your first post, it sounds like this was a straight install but assuming it’s not maybe disabling more exotic modules might help.

    Sorry if that sounds like a bit of a dodge. Not really sure what might cause the password to revert like that, especially if you changed it in the database by hand. You might want to post the question on the Drupal forum.


    Also for those reading the thread, the SQL to update the password manually is:

    UPDATE users SET pass = MD5(’new password’) WHERE uid = 1;

    Obviously, you replace ‘new password’ with the password of your choice. :)

Leave a Reply