fbpx Drupal redirect after logout | ComputerMinds Skip to main content

Drupal redirect after logout

An article from ComputerMinds - Building with Drupal in the UK since 2005.
6th Dec 2007

Mike Dixon

Senior Mind

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.