MyBB Community Forums

Full Version: Redirection
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
How do I make the user to be redirect when he login to the page that he was before the registration??
Like if he is in the portal.php and he logins he will continue in the portal.php page and won't be redirected to the index.php.
(2010-01-15, 04:43 PM)Skiilz Wrote: [ -> ]How do I make the user to be redirect when he login to the page that he was before the registration??
Like if he is in the portal.php and he logins he will continue in the portal.php page and won't be redirected to the index.php.

For the portal it does that automatically I think.
(2010-01-15, 05:38 PM)babjusi Wrote: [ -> ]
(2010-01-15, 04:43 PM)Skiilz Wrote: [ -> ]How do I make the user to be redirect when he login to the page that he was before the registration??
Like if he is in the portal.php and he logins he will continue in the portal.php page and won't be redirected to the index.php.

For the portal it does that automatically I think.

No... I tested it.
If I login/logout in the portal it will redirect me to the index.php
how are you logging in via the portal? the login link, quick login or the login box?
(2010-01-15, 06:00 PM)pavemen Wrote: [ -> ]how are you logging in via the portal? the login link, quick login or the login box?
Login box...
strange, my portal.php login box redirects me to the portal page. Open the portal.php file and find

$plugins->run_hooks("portal_start");

and look a few lines up and you should find

redirect("portal.php", $lang->redirect_loggedin);

if that is the case, you should be redirected back to the portal page
Portal.php file find:

redirect("portal.php", $lang->redirect_loggedin);

And change the portal.php with the url where you want your members to be redirected to after they login at portal. But as shown from the code, it redirects already to the portal page.

P.s. Have you renamed the portal.php file by any chance btw?
No...
Its the default from MyBB.
I have this in my portal.php...
Try the suggestion above. It should work 100%.
I have this in my portal.php.....
Pages: 1 2