1 user.module user_is_logged_in()

Determines if the current user is logged in.

Return value

bool: TRUE if the user is logged in, FALSE if the user is anonymous.

File

core/modules/user/user.module, line 1332
Enables the user registration and login system.

Code

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