Hi,

I just want to know which variable i can use in "page.tpl.php" file for checking whether the user has logged in or not.

if(user_loggedin)
{
some links
}
else
{
some other links
}

I want to know which variable should be there in place of "user_loggedin". Could anyone please help me out on this ?

Thanks in Advance !! :)

Comments

fidot’s picture

apsivam’s picture

just an example

global $user;
if( $user->uid ) {
  echo "logged in";
}
else {
  echo "not logged in";
}

--
Cheers,
Sivanandhan, P. (a.k.a. apsivam)