/ Published in: PHP

**Important: this snipplet has moved to Github.**
- [Programmatically log out the user in Drupal](https://gist.github.com/1973079)
- [Programmatically log out the user in Drupal](https://gist.github.com/1973079)
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
// Programmatically logs out the current user global $user; $tmp = NULL; user_module_invoke('logout', $tmp, $user); $user = drupal_anonymous_user();
Comments
