You are here

function user_logout in Drupal 7

Same name and namespace in other branches
  1. 8 core/modules/user/user.module \user_logout()
  2. 4 modules/user.module \user_logout()
  3. 5 modules/user/user.module \user_logout()
  4. 6 modules/user/user.pages.inc \user_logout()
  5. 9 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 276
User page callback file for the user module.

Code

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