News:

Wondering if this will always be free?  See why free is better.

Main Menu

How to redirect after logout?

Started by geezmo, September 17, 2006, 09:37:31 AM

Previous topic - Next topic

geezmo

My forum is at www.mainsite.com/forum and I want to implement a code that redirects those who log out of the forum to the main site www.mainsite.com. How can I do this? Thanks.

codenaught

Open Sources/LoginOut.php

Find:

// Off to the merry board index we go!
if (empty($_SESSION['logout_url']))
redirectexit('', $context['server']['needs_login_fix']);
else
{
$temp = $_SESSION['logout_url'];
unset($_SESSION['logout_url']);

redirectexit($temp, $context['server']['needs_login_fix']);
}


Change to:

// Off to the merry board index we go!
if (empty($_SESSION['logout_url']))
redirectexit('http://google.com', $context['server']['needs_login_fix']);
else
{
$temp = $_SESSION['logout_url'];
unset($_SESSION['logout_url']);

redirectexit('http://google.com', $context['server']['needs_login_fix']);
}


Changing the http://google.com part to whatever address you want.
Dev Consultant
Former SMF Doc Coordinator

geezmo


Advertisement: