< ?php
/**
* The following simple snippet
* displays different information to anonymous/logged in users within a page.
*
* This works with drupal 4.5 and drupal 4.6
*/
global $user;
if ($user->uid) {
return “This message is only visible for logged-in users.”;
}
if (!$user->uid) {
return “This message is only visible for not-logged-in users.”;
}
?>