[development] Controlling login/logout in a menu
dylan at io.com
Thu Oct 22 02:41:45 UTC 2009
On Oct 21, 2009, at 2:18 PM, Jeff Greenberg wrote:
> 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?
That's automatic if you use the paths "user/login", "logout", and
"user/register". (BTW their visibility isn't magical or anything,
It's controlled by the access callbacks in user_menu()).
More information about the development