User authentication box.
Jose C. - September 25, 2006 - 08:16
Greetings everyone:
I want to ask you a quick question: is there a way to make the "login box" be part of the content of my Drupal site?
I have a site running on Drupal. Right now, the user box is in every page, because it's part of the left sidebar. I want the user box to not be available, unless the user clicks on a menu link (let's call it "Log in"), in which case it should be printed in the content area, not the left or right sidebar.
What's the easiest way to achieve this in Drupal?
Thank you so much in advance.
Jose Carlos.

Pretty easy...
Servus, José.
The Login box isn't glued to the left sidebar... It's quite easy to get it out of there.
Go to administer::blocks. Select your theme. You'll get a list of where blocks get displayed. You'll find "user login" assigned to some block -- remove the "enabled" checkmark.
Next, set up a menu item for login -- the page you should point to is "user"...
Hope this helps,
Norbert
-- form follows function
Thanks Norbet. That's useful
Thanks Norbet. That's useful to me too.
I have one question though:
once the user logs in it remains in 'user account' .
Is there a way to have it return to the main page automatically when the user logs in?
regards,
mike
It did help!
Thanks for your help Norbert.
Following your instructions, I was able to put the Login Box in the Content section. Do you know where can I modify the order in which content is displayed in the content area?
By this I mean the following: In my Drupal site, I have a few pages that are shown to users whenever you click on a menu item. After making the Login Box be part of the Content, the pages are shown first, and just below appears the Login Box. Is there a way to tell Drupal to show first the Login Box, and then the content of the link, in this case the pages?
I've seen that themes print a variable called $content. Maybe I should find the file where that variable is assigned, shouldn't I? Or is there a second solution?
Thank you very much for your help.
Jose Carlos.
Everything built-in
Servus, José.
No need to deal with theming for this -- just give the login box a negative weight and it will float "on top" of the other nodes on your page...
Norbert
-- form follows function
Still below.
Greetings Norbert:
Thank you once again for your help; however, after giving the login box block a negative weight, the Login Box still appears below the page (which is node 12, as an anecdotical fact).
Is there something I'm doing wrong? I even tried giving the page a positive weight, and it still appears on top of the login box.
Any help would be appreciated.
Thank you very much in advance.
Jose Carlos.