Custom logout redirects
dugawug - December 24, 2007 - 04:31
| Project: | Drupal |
| Version: | 5.7 |
| Component: | user.module |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
I'd like to be able to provide the URL end users will reach after logging out instead of my domain being the default and only option www.mysite.com

#1
With Drupal 5.7 adapt then use the following link:
http://www.example.com/logout&destination=node/mylogoutpage
This link do a log out then redirect to the page "mylogoutpage".
On your site, replace "www.example.com" with your domain and change the "node/mylogoutpage" with the path of your goodbye page.
If you use menus disable the default "logout" link in Admin --> Menus and then manually create a link somewhere on your site that uses the above link.
Source: http://drupal.org/node/120253
#2
This feature doesn't accept third party urls. I'd like to do something like:
http://www.example.com/logout?destination=http://www.another-site.com/?v...
Possible? when I try that example on my site, It just goes to http://www.example.com/www.another-site...etc
Any ideas?
Thanks!
#3
modify the drupal_goto() function!
#4
Thanks sid. I'll have a look.
One more question, if you don't mind:
Is there a way to set up a custom logout? Not my altering core, but maybe in template.php or something?
I'd like to do a bit of php code during the logout process. My install ties into a custom login process, and when a user clicks a logout link, I have to do a couple of database calls, update a few session variables in addition to logging out of drupal.
Any way to have a custom function somewhere, where I could do something like this, without altering core?
TIA
#5
please check the links below.
http://drupal.org/node/203538
http://drupal.org/node/120253