function user_is_anonymous

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

6 calls to user_is_anonymous()
comment_form_submit in drupal/modules/comment/comment.module
Process comment form submissions; prepare the comment, store it, and set a redirection target.
hook_menu_site_status_alter in drupal/modules/system/system.api.php
Control site status before menu dispatching.
openid_menu_site_status_alter in drupal/modules/openid/openid.module
Implements hook_menu_site_status_alter().
openid_test_menu_site_status_alter in drupal/modules/openid/tests/openid_test.module
Implements hook_menu_site_status_alter().
user_menu_site_status_alter in drupal/modules/user/user.module
Implements hook_menu_site_status_alter().

... See full list

4 string references to 'user_is_anonymous'
drupal-6.bare.database.php in drupal/modules/simpletest/tests/upgrade/drupal-6.bare.database.php
Bare installation of Drupal 6.17, for test purposes.
drupal-6.filled.database.php in drupal/modules/simpletest/tests/upgrade/drupal-6.filled.database.php
Filled installation of Drupal 6.17, for test purposes.
openid_menu in drupal/modules/openid/openid.module
Implements hook_menu().
user_menu in drupal/modules/user/user.module
Implements hook_menu().

File

drupal/modules/user/user.module, line 1529
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']);
}