function user_logout_current_user
Logs the current user out.
2 calls to user_logout_current_user()
- user_logout in modules/
user/ user.pages.inc - Menu callback; logs the current user out, and redirects to the home page.
- user_pass_reset in modules/
user/ user.pages.inc - Menu callback; process one time login link and redirects to the user page on success.
File
-
modules/
user/ user.pages.inc, line 288
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();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.