Author image
Senior Mind

Drupal redirect after logout

A quick one that came up today, we all know about the login redirect module, which automatically redirects the user to a specific page when they login ... but what about at logout?

Its a common scenario, you want to display a nice 'come back soon' message when one of your lovely users does the unthinkable and logs out. One solution would be to create a new module, implement hook_user and then invoke a drupal_goto when the $op=='logout'.

A simpler solution is just to add the query string ?destination=my-path (where my-path is the drupal path of your post logout page) to your logout link.