[development] Controlling login/logout in a menu

Jeff Greenberg jeff at ayendesigns.com
Wed Oct 21 21:18:01 UTC 2009

I'm using the secondary menu to put a few links at the top right of the 
screen. Among them should be login (if not already) and logout (if 
logged in). Adding them to the menu is, of course, not an issue, but how 
would I control their appearing or not based on whether the user is 
logged in? I was going to use hook_menu_alter, but for some odd reason 
it doesn't fire when I'm not on an admin page. Something tells me this 
is going to be a forehead slapping moment, it seems so trivial, but it's 
eluding me.

More information about the development mailing list