Pages

how to check if user is login are not in drupal

Friday, 18 July 2014

how to check if user is login are not in drupal
Ans:

if (user_is_logged_in()) {
// Do something.
}
   are

global $user;
   if($user->uid!=0){
   echo "Logged In";
   }
   else{
   echo "Not logged in";
   }

 

Most Reading