I think that was drupal 6 where the user menu e.g.:


will turn into:

-Log out

link when the user is not logged in and when the user is logged in respectively.

I do not know how to make this behave like this in Drupal 7.

Any ideas?


Drupal 7 out of the box will recognize these if you add them to any menu. It will automatically hide/reveal them based on their context.

Create two menu items, one pointing to user/login and one to user/logout

| improve this answer | |
  • The log in/logout link works fine,the 'My Account' does not seem to work however. If I am logged out, the My Account link still appears. There is no point of this appearing when the link log in is already there... thanks for your help! – jan Dec 4 '11 at 17:36
  • Drupal 7 has this already hardcoded in to make sure it only appears when logged in. Go to admin/structure/menu/manage/user-menu. You will see "My Account" there. If you want it in another menu, move it there by clicking on edit and change the parent item. – user842 Dec 4 '11 at 17:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.