function tokenauth_exit in Token authentication 6.2
Same name and namespace in other branches
- 5 tokenauth.module \tokenauth_exit()
- 6 tokenauth.module \tokenauth_exit()
- 7 tokenauth.module \tokenauth_exit()
Implementation of hook_exit(). Deliberately insure that this session will not be saved by sess_write(). Safety.
See also
user_logout
File
- ./
tokenauth.module, line 115
Code
function tokenauth_exit() {
global $user;
if (tokenauth_is_token_authenticated()) {
// Destroy the current session:
session_destroy();
// Load the anonymous user
$user = drupal_anonymous_user();
}
}