user_logout
Drupal 7 user_logout()
Menu callback; logs the current user out, and redirects to the home page.
1 call to user_logout()
9 string references to 'user_logout'
File
- modules/
user/ user.pages.inc, line 167 - User page callback file for the user module.
Code
function user_logout() {
global $user;
watchdog('user', 'Session closed for %name.', array('%name' => $user->name));
module_invoke_all('user_logout', $user);
// Destroy the current session, and reset $user to the anonymous user.
session_destroy();
drupal_goto();
}

