By MattParsons on
Hi there,
I am integrating my own program into a Drupal install, and have log out buttons on my pages. I currently have them redirecting to a script which contains the following:
require_once './includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
sess_destroy($key);
sess_destroy(session_id());
db_query("TRUNCATE TABLE cache");
header ("Location: /Home.php");
This doesn't appear to be cancelling the user's session however, so does anyone know what i've missed!?
Any thoughts would be great!
Thanks.
Comments
I had a custom logout in module
I did this in reponse to a menu handler 'mymodule/logout' vs. a different .php file so I was already bootstapped, etc. and in the normal drupal callback handling so not exactly like your example but this worked.
dLd