Same name and namespace in other branches
  1. 6.x modules/user/user.module \user_is_anonymous()

Determines if the current user is anonymous.

Return value

bool TRUE if the user is anonymous, FALSE if the user is authenticated.

5 calls to user_is_anonymous()
comment_form_submit in modules/comment/comment.module
Process comment form submissions; prepare the comment, store it, and set a redirection target.
hook_menu_site_status_alter in modules/system/system.api.php
Control site status before menu dispatching.
openid_menu_site_status_alter in modules/openid/openid.module
Implements hook_menu_site_status_alter().
user_menu_site_status_alter in modules/user/user.module
Implements hook_menu_site_status_alter().
user_register_access in modules/user/user.module
Determines if the current user has access to the user registration page.
2 string references to 'user_is_anonymous'
openid_menu in modules/openid/openid.module
Implements hook_menu().
user_menu in modules/user/user.module
Implements hook_menu().

File

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

Code

function user_is_anonymous() {

  // Menu administrators can see items for anonymous when administering.
  return !$GLOBALS['user']->uid || !empty($GLOBALS['menu_admin']);
}