Roundcube Community Forum

 

Logout Redirection

Started by Gumtee, August 13, 2006, 06:32:35 AM

Previous topic - Next topic

Gumtee

Hi,

Is there a way to redirect logging out to a html page e.g. to a custom you-are-now-logged-out.html instead of back to the default login page?

Thanks. :)



flash

I bet you could trap it in the index.php file based on the query string

?_task=mail&_action=logout

then do a
header('location: your_page.html'); die();

but you would have to do it after the actual logout process.

I will poke around some, that does sound like a neat idea.

flash

Just add this line:

 header('location: http://google.com'); die();

change google to your page

add it in this section of index.php

// end session
else if ($_action=='logout' && isset($_SESSION['user_id']))
 {
 show_message('loggedout');
 rcmail_kill_session();
 header('location: http://google.com'); die();
 }

Gumtee

Aha! Thanks for your time Flash, it works beautifully. Hope this helps some others too. :D

flash

I could see how this may be desired by many people in different situations. It would be easy to make this part of the config. Just set a config array variable with the "logout url" in the config file - or leave the variable blank. Then in the code do a simple if test. If the value is there, execute the line. If the variable has no value, back to the login page. A very easy two line mod (one to each file - config and index) to make this a config option.

I would suggest that mod, but I don't know how to do that around here. There should be a place to submit proposed code in the forum.

xoqez

Post it under Roundcube Webmail Forum > Latest Release [ 0.1 Beta 2 ] > Requests

--
Venond; using roundcube since June 2006
www.venond.com