<?php
global $user;
if ($user->uid) {
// User is logged in.
}
?>
global $user;
if ($user->uid) {
// User is logged in.
}
?>
This works because all guests browsing the site will have a uid of 0. That will return FALSE in the IF statement while any positive number will return TRUE. In Drupal, logged in users are referred to as authenticated users.
0 comments :
Post a Comment
Hi there! Please leave your message here. Also, I may not be able to respond to your query right away. So please bear with me. Thanks. :)