Drupal - Does user_is_logged_in() check if there is at least one user logged in?

By looking at the Drupal API, you can see the function itself:

<?php
function user_is_logged_in() {
  return (bool) $GLOBALS['user']->uid;
}
?>

Which shows that it returns TRUE if the current session is a logged-in user, or FALSE if the current session is an anonymous user.


It refers to the current session.


The function checks that the user who is viewing the page is not the anonymous user, not that between all the users currently viewing the site there is a logged-in user. So, four users seeing the site will get a different result, basing on the fact each of them is logged-in or not.

Tags:

Users

7

Sessions