1.20.x 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

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

Code

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