Jump to content

Vbulletin Login Redirect...


phpSensei

Recommended Posts

I added a feature where user's can login to my forum from the index of my site...

 

everything works, but once the user logs in, it redirects the user to my index page.

 

function do_login_redirect()
{
global $vbulletin;

if (
	$vbulletin->url == 'login.php'
	OR $vbulletin->url == $vbulletin->options['forumhome'] . '.php'
	OR strpos($vbulletin->url, 'do=logout') !== false
)
{
	$vbulletin->url = $vbulletin->options['forumhome'] . '.php' . $vbulletin->session->vars['sessionurl_q'];
}
else
{
	$vbulletin->url = fetch_replaced_session_url($vbulletin->url);
	$vbulletin->url = preg_replace('#^/+#', '/', $vbulletin->url); // bug 3654 don't ask why
}

$temp = strpos($vbulletin->url, '?');
if ($temp)
{
	$formfile = substr($vbulletin->url, 0, $temp);
}
else
{
	$formfile =& $vbulletin->url;
}

$postvars = $vbulletin->GPC['postvars'];

($hook = vBulletinHook::fetch_hook('login_redirect')) ? eval($hook) : false;

eval(print_standard_redirect('redirect_login', true, true));
}

 

How would I go about changing this redirect function from Vbulletin, to redirect to its normal page?

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.