Sorry to bother you with such a trivial question but I'm getting nowhere searching the forums or browsing the API docs ...
Is there a Drupal variable of some kind available that simply indicates whether the current user is logged in or not?
Better still, is there a document somewhere that details this and all similar variables?

Thanks

Comments

yelvington’s picture

The global $user object is always available, and $user->uid will be zero for any visitor. Anything else is logged in.

Read the theme developer's handbook for explanations of variables that are available in the context of page, node and block templates.

Marko B’s picture

there is if (user_is_logged_in()) {.... function to use in d6 i suppose there is also in d5 :-)