The following piece of codes check if the Drupal visitor is logged in or not.
...
if (user_is_logged_in()) {
// user is logged in
} else {
// anonymous user
{
...
Done =)
Reference: Drupal API – user_is_logged_in
The following piece of codes check if the Drupal visitor is logged in or not.
...
if (user_is_logged_in()) {
// user is logged in
} else {
// anonymous user
{
...
Done =)
Reference: Drupal API – user_is_logged_in