Determines if the current user is logged in.
bool TRUE if the user is logged in, FALSE if the user is anonymous.
function user_is_logged_in() { return (bool) $GLOBALS['user']->uid; }