function tokenauth_exit in Token authentication 6
Same name and namespace in other branches
- 5 tokenauth.module \tokenauth_exit()
- 6.2 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 120
Code
function tokenauth_exit() {
global $user;
if (isset($_SESSION['tokenauth_auth'])) {
// Destroy the current session:
session_destroy();
// Load the anonymous user
$user = drupal_anonymous_user();
}
}