Come together with the global Drupal community in Rotterdam, 28 Sept – 1 Oct 2026. Sessions, contribution, connection, and Early Bird savings until 8 June.
This really helped with getting the name to appear above my user menu when someone is logged in. However, when no one is logged in, the user menu (which also appears in my footer) doesn't have a title. Is anyone able to help me with the simple programming for adding a title such as "Members" when no one is logged in/anonymous user?
Comments
Comment #1
komal.savla commentedHi,
Add this code in template.php inside the
function corolla_preprocess_block(&$variables)This will change the title of the user menu block to the name of the user
Thanks,
Komal
Comment #2
glennnz commentedPerfect, thanks
Comment #3
cptlonestar commentedHi,
This really helped with getting the name to appear above my user menu when someone is logged in. However, when no one is logged in, the user menu (which also appears in my footer) doesn't have a title. Is anyone able to help me with the simple programming for adding a title such as "Members" when no one is logged in/anonymous user?
Any help would be greatly appreciated.
Comment #4
cptlonestar commentedComment #5
glennnz commented@Cptionestar
Try this:
Glenn
Comment #6
glennnz commentedChange 'Anonymous' to whatever you want the block title to be.