function _tfa_logout in Two-factor Authentication (TFA) 6
Same name and namespace in other branches
- 7 tfa.module \_tfa_logout()
Logout user. Similar to user_logout() but doesn't redirect.
1 call to _tfa_logout()
- tfa_user in ./
tfa.module - Implements hook_user().
File
- ./
tfa.module, line 109 - Two-factor authentication for Drupal.
Code
function _tfa_logout() {
global $user;
watchdog('tfa', 'Session closed for %name.', array(
'%name' => $user->name,
));
session_destroy();
module_invoke_all('user', 'logout', NULL, $user);
// Force anonymous user.
$user = drupal_anonymous_user();
}