function drupal_anonymous_user

cis7 drupal_anonymous_user()
cle7 drupal_anonymous_user()
elmsmedia7 drupal_anonymous_user()
icor7 drupal_anonymous_user()
meedjum_blog7 drupal_anonymous_user()
mooc7 drupal_anonymous_user()

Generates a default anonymous $user object.

Return value

Object - the user object.

20 calls to drupal_anonymous_user()
comment_form_node_type_form_alter in modules/comment/comment.module
Implements hook_form_FORM_ID_alter().
devel_block_configure in sites/all/modules/ulmus/devel/devel.module
Implementation of hook_block_configure().
devel_create_users in sites/all/modules/ulmus/devel/devel_generate/
Generate some random users.
devel_switch_user_list in sites/all/modules/ulmus/devel/devel.module
DrupalWebTestCase::drupalCreateUser in modules/simpletest/drupal_web_test_case.php
Create a user with a given set of permissions.

... See full list


includes/, line 2152
Functions that need to be loaded on every Drupal request.


function drupal_anonymous_user() {
  $user = variable_get('drupal_anonymous_user_object', new stdClass);
  $user->uid = 0;
  $user->hostname = ip_address();
  $user->roles = array();
  $user->roles[DRUPAL_ANONYMOUS_RID] = 'anonymous user';
  $user->cache = 0;
  return $user;



Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/ in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/
The website encountered an unexpected error. Please try again later.