function user_logout

Same name in other branches
  1. 9 core/modules/user/user.module \user_logout()
  2. 8.9.x core/modules/user/user.module \user_logout()
  3. 10 core/modules/user/user.module \user_logout()
  4. 11.x core/modules/user/user.module \user_logout()

Menu callback; logs the current user out, and redirects to the home page.

1 call to user_logout()
user_menu_site_status_alter in modules/user/user.module
Implements hook_menu_site_status_alter().
4 string references to 'user_logout'
TriggerUserTokenTestCase::testUserTriggerTokenReplacement in modules/trigger/trigger.test
Tests a variety of token replacements in actions.
trigger_test_action_info in modules/trigger/tests/trigger_test.module
Implements hook_action_info().
trigger_user_logout in modules/trigger/trigger.module
Implements hook_user_logout().
user_menu in modules/user/user.module
Implements hook_menu().

File

modules/user/user.pages.inc, line 280

Code

function user_logout() {
    user_logout_current_user();
    drupal_goto();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.