[support] How to hide Navigation menu for non-authenticated users?
Jody Cleveland
Cleveland at winnefox.org
Wed Sep 6 16:27:25 UTC 2006
Thank you!! That worked great.
> In the custom block options for the Navigation menu, you'd be able to
> use PHP code to determine whether to actually display it.
> Something like
> this would tend to work (untested):
>
> <?php
> global $user;
> return $user->uid ? TRUE : FALSE;
> ?>
>
> What this is saying is:
>
> * load in the special Drupal object $user.
>
> * if the user's user ID exists ($user->uid), then it is
> TRUE that we want to display this block. If it doesn't
> exist (in the case of an unauthenticated viewer), then
> it is not true (FALSE) that we want to display the block.
- jody
More information about the support
mailing list