Greetings!,

I am writing a new module for drupal that requires me to setup additional cookies.
The problem i have on hand is that, if a use clicks on logout, i need to destroy the cookies that were setup.

Is there a function that can be used to perform certain tasks when user clicks on logout ?

Please help
-Jula

Comments

mirnazim’s picture

You need to implement hook_user for your module.

Sample code:

function mymodule_user($op, &$edit, &$account, $category = NULL) {
  if ($op == 'logout') {
    // DO YOUR STUFF HERE
  }
}

hope this helps.

Ravi.J’s picture

Thanks for the quick reply, appreciate your help

Cheers!!