SMF Support > SMF 2.0.x Support
How to redirect after login
floridaflatlander:
I use smf's ssi functions and they work great.
However when someone registers for the first time they are redirected to the forum index.
If they have just registered I want to redirect them to the site index page if they are logging in for the first time or the page they started the registeration process at.
But if they login at the forum I want they to stay at the forum.
I add every few cookies(1) to the site, smf does the rest but I can use the cookie I have or make another if it would help.
K@:
I've not updated this. But, it works on my v2.0.2 site, if it helps.
http://custom.simplemachines.org/mods/index.php?mod=2666
floridaflatlander:
I think that did it, regular login is taken care of by ssi so I'm not worried about that.
I used this in the Activate()
if (isset($_COOKIE['cookie_name'])) {
$_SESSION['login_url'] = 'folder/index.php';
}
Seems to work, I'll play with it more and come back and mark this solved if I have no problems.
Thanks
K@:
Good finkin'! :)
floridaflatlander:
Works like a charm.
Thanks Again
Navigation
[0] Message Index
[#] Next page
Go to full version