Posted by chaithanya.kvk on November 8, 2012 at 6:15am
Hi,
I wrote a div in page.tpl in drupal 7. The div carries a static image in it. I want the image to be displayed only when no user is logged in. Once if any user log in the div should not display. I am trying to work out with some loop but could not get any clue. Please any help?
Thanks.
Comments
use user_is_logged_in() api
<?phpif(user_is_logged_in()){
//do something here for logged in users
}
else{
//do something here for non logged in users
}
?>
Ryan Gambito
http://ryangambito.com/
Thanks
Thanks lot! it worked for me.
Chaithanya Kudapa