On this page
function user_logout_current_user
user_logout_current_user()
Logs the current user out.
File
- modules/user/user.pages.inc, line 205
- User page callback file for the user module.
Code
function user_logout_current_user() {
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();
}
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!user!user.pages.inc/function/user_logout_current_user/7.x