Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
How to get the Login/Register in the user menu? I added a link 'Login' in the nav menu which works but after logging in, the Login appears next to the Logout link. I know this is the wrong way to do and not sure how to go about it.
Please help! Thanks in advance!
Comments
Comment #1
nchar CreditAttribution: nchar commentedThe simplest way is to create a new menu. Then create the menu link "Login" and assign this menu's block to "anonymous user" role.
Comment #2
abzal CreditAttribution: abzal commentedHey, I created the menu link and assigned the menu block to navigation and also have assigned this only to 'anonymous user',
But the login link doesn't show up in the Menu?
Thanks!
Comment #3
abzal CreditAttribution: abzal commentedHey, I created the menu link and assigned the menu block to navigation and also have assigned this only to 'anonymous user',
But the login link doesn't show up in the Menu?
Thanks!
Comment #4
abzal CreditAttribution: abzal commentedIts fixed now! There is a 'Log In' link without any path in User Menu which i didn't see earlier. I had it enabled now, the Log in and Log out is working fine now.
Comment #5
iRex CreditAttribution: iRex commentedI have a similar issue. The User Menu contains only the 'My account' and 'Logout' links. The 'My account' is disabled, and I cannot enable - I check it and save, and it remains unchecked (disabled).
The menu also does not have a 'Login' link, so I created one and put it in the same position -11 as the 'Logout' link. I does not appear both my admin menu or the menu presented to anonymous users.
Comment #6
iRex CreditAttribution: iRex commentedDrupal 101: Clear the cache, Clear the cache. Clear the cache....
I cleared the cache and my new 'Login" link appeared!