Dynamic login/logout account menu module
June 8th, 2009 | posted by Alpha Epsilon Delta
Here is a Drupal module to provide a dynamic [Login][My account][Log out] menu. Before the user is logged in, the menu shows only [Log in]. After, the menu change to [My account][Log out].
This is an alternative to the "User login" block. Maybe you do not want the "User login" block on every page, taking up valuable space and grabbing user attention away from your contents.
However, the links can be move to any menu through the admin/setting/accountmenu path. Here, I've moved the links to be part of the primary-links menu:
You can try a demo of this at http://zen.hddigitalworks.com, you can try the login behavior with user "visitor", password "123".
The menu can be rearranged, reconfigure, move to be a sub-menu through the admin/build/menu interface.
The module is at http://drupal.org/project/accountmenu.
11944
in
Here is a Drupal module to provide a dynamic [Login][My account][Log out] menu. Before the user is logged in, the menu shows only [Log in]. After, the menu change to [My account][Log out].
This is an alternative to the "User login" block. Maybe you do not want the "User login" block on every page, taking up valuable space and grabbing user attention away from your contents.
How it works
-
When the user has not logged in, you get a [Log in/Create account] menu:
click the "Log in/Create account" menu will takes you to the regular Drupal 'user' page:
-
After the user is logged in, the menu change to [My account][Log out] and browser returns to where the user was:
if the user was at the "page not found" 404 page, browser returns to the front page instead. (Note: default Drupal 404 page does not show navigation menu. To have Drupal show navigation menu, define your own 404 page at "admin/settings/error-reporting".)
-
Click "My account" goes to the Drupal account page:
Click "Log out" log out and return to front page.
How to use
By default the links are under the "Account menu". This is just like any menu like the primary-links, navigation. It can be placed in any block region:
However, the links can be move to any menu through the admin/setting/accountmenu path. Here, I've moved the links to be part of the primary-links menu:
You can try a demo of this at http://zen.hddigitalworks.com, you can try the login behavior with user "visitor", password "123".
The menu can be rearranged, reconfigure, move to be a sub-menu through the admin/build/menu interface.
The module is at http://drupal.org/project/accountmenu.
11944
hey i appreciate the work you
hey i appreciate the work you did on this module as it helped me out a good bit. my question is if you could kindly point me to where i need to look for changing the default url for the login link? the stuff in the thickbox is a bit cramped up and i would like to make it a bit wider, but i guess i'm missing something.
regards,
best regards
In drupal, there is an account menu provided by core user module, with 2 links: "my account" an "log out".
These 2 links are generated from lines 1043 to 1061 in modules/user/user.module, and are available through a user login block. I've just tried to remove these lines from the user.module code and they vanished as expected. Then i put the code back, but my links didn't come back!
thank you
I did the exact same thing, for some strange reason the link does not come back... you have to uninstall the whole thing and then install it from scratch. I have no idea if there is a better way but that's what worked for me.
This information is very
This information is very interesting, I really enjoyed, I would like get more information about this, because is very beautiful, thanks for sharing.
appropriate information
I found this blog good as I found appropriate information on drupal.
LOGIN/LOGOUT MODULE
I am still doing some mistake while creating the login logout module in drupal. Let me try this tutorial to see how it works for me for my Lag switch 360 website
LOGIN/LOGOUT MODULE
I am still doing some mistake while creating the login logout module in drupal. Let me try this tutorial to see how it works for me for my website
Creating the login logout module
I am finding some problems in creating the login logout module in drupal. I have tried this tutorial which helped me a lot for for my sleeper sofa website
Good
You have posted excellent tutorial about Dynamic login/logout account menu module.I have learned lot of thing s and here and the best part is the way you presented the tips is very impressive and appreciable.constipation after surgery
nice
nice
Excellent posts to read keep
Excellent posts to read keep it up and keep going on this way. And keep sharing these types of things Thanks and I read your article and I keep reading your content.. It’s very interesting..!
Reply
You have posted excellent tutorial about Dynamic login/logout account menu module.I have learned lot of thing s and here and the best part is the way you presented the tips is very impressive and appreciable.
Reply
The work you did on this module helped me out a lot. My question is if you could kindly point me to where i need to look for changing the default url for the login link?
Nice
Normal 0 false false false MicrosoftInternetExplorer4 Normal 0 false false false MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman"; mso-ansi-language:#0400; mso-fareast-language:#0400; mso-bidi-language:#0400;} /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman"; mso-ansi-language:#0400; mso-fareast-language:#0400; mso-bidi-language:#0400;}
In science there is a dictum: don't add an experiment to an experiment. Don't make things unnecessarily complicated. In writing fiction, the more fantastic the tale, the plainer the prose should be. Don't ask your reader to admire your words when you want them to believe your story.
nice
I found the perfect place for my needs. Contains wonderful and useful messages. I have read most of them and has a lot of them. To me, he's doing the great work.
This topic hasn’t been
This topic hasn’t been much discussed on the internet, so it’s good to see people sharing these types of rare information through their blogs which provide knowledge to the readers in many ways.
Can't remove menu items from primary links
Hi, I'm trying this module and added the loing/logout itmes to the primary links. Now when I go to /admin/build/menu-customize/primary-links to remove them, the option to "delete" is missing. I can only disable. Please let me know what I should do. (Drupal 6)
Thanks in advance.
I really loved reading your
I really loved reading your blog. It was very well authored and easy to understand. Unlike additional blogs I have read which are really not that good .
This was a really neat
This was a really neat dynamic login/logout account menu module and I’ve seen quite a few believe me!! I was really impressed with the way the drupal module has been demonstrated here and I am sure that by following the step by step directions, users will be able to understand how to work and use it with the help of the screen shots!! I hope we get more of such innovative and helpful tips so that we can make good use4 of it!!
a marvelous source of info
I visited this page first time and found it Very Good Job of acknowledgment and a marvelous source of info.........Thanks Admin!
I have learned lot of thing s
I have learned lot of thing s and here and the best part is the way you presented the tips is very impressive and appreciable.
RE
I even told my friends to take a look at your blog and in fact your blog is already bookmarked on my computer. Hope to see more of this. Great..
Tony
Loved it
I really loved reading your blog. It was very well authored and easy to understand. Unlike additional blogs I have read which are really not that good .
I had a tough time
I had a tough time implementing this Login module but your post has made my path easy to an extent.I will follow some of your ideas.
Post is nicely written and
Post is nicely written and well explained. i appericiate your writing style and things you mentioned in this post
hollister uk
thank you very much for taking the time to share with those who are starting on the subject. Thanks for providing us such a useful information.
good share
This was actually a very good tutorial . I had some problems logging in but this article helped me out in a big way. Thanks for sharing this with the community.
I am still doing some mistake
I am still doing some mistake while creating the login logout module in drupal. Let me try this tutorial to see how it works for me for my website
Plagiarism checker
I have been reading your posts regularly. I need to say that you are doing a fantastic job. Please keep up the great work.
Plagiarism checker
leather trousers
Article was a tribute to the one of the worlds finest bands. Even though it has been over 25years since the band performed under one roof, its very heart touching to know that a huge audience welcomed them with warm hearts.leather trousers
Post new comment