function 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 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().
- openid_test_menu_site_status_alter in modules/
openid/ tests/ openid_test.module - Implements hook_menu_site_status_alter().
- user_menu_site_status_alter in modules/
user/ user.module - Implements hook_menu_site_status_alter().
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
Code
function user_is_anonymous() {
// Menu administrators can see items for anonymous when administering.
return !$GLOBALS['user']->uid || !empty($GLOBALS['menu_admin']);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.