Moderators mark1million Posted January 24, 2009 Moderators Report Share Posted January 24, 2009 Hi guys, im having trouble locating the settings when a pilot logs in they are redirected to their main profile. I have this setup before but after some changes and updating its gone back to when you log in you go back to the main index. Thanks. Quote Link to comment Share on other sites More sharing options...
mw308 Posted January 24, 2009 Report Share Posted January 24, 2009 Hi Mark Edit core/modules/login/login.php, and change the line near the bottom at the login_complete section from Template::Set('redir', SITE_URL . '/' . $this->post->redir); to Template::Set('redir', SITE_URL . '/index.php/profile' . $this->post->redir); Let me know of any problems. Quote Link to comment Share on other sites More sharing options...
Moderators mark1million Posted January 24, 2009 Author Moderators Report Share Posted January 24, 2009 Ah thank you. Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted January 24, 2009 Administrators Report Share Posted January 24, 2009 I'd change the <input .. name="redir"> in the template, in stead of in the code Quote Link to comment Share on other sites More sharing options...
mw308 Posted February 2, 2009 Report Share Posted February 2, 2009 Sorry to bump this, but I've changed the login_complete.tpl file (after changing the above one back), and while the change works when logging in, it causes the logout to not work correctly. I changed the line: window.location = "<?php echo $redir?>"; to window.location = "<?php echo $redir?>/index.php/profile"; Is this correct? When I log out I end up trying to see the profile page rather than the login page or home page. Is there any way to change the page that it forwards to on logout? Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted February 2, 2009 Administrators Report Share Posted February 2, 2009 instead of echo $redir do <?php echo SITE_URL ?> That'll goto the base url, then you can specify index.php/??? wherever, or just forward to the home page Quote Link to comment Share on other sites More sharing options...
RogerB Posted February 2, 2009 Report Share Posted February 2, 2009 Remember guys, don't alter the core/templates. Save those is case you make a boo boo. Quote Link to comment Share on other sites More sharing options...
mw308 Posted February 3, 2009 Report Share Posted February 3, 2009 Hi Nabeel I made the change as you said, and now have: window.location = "<?php echo SITE_URL?>/index.php/profile"; However upon logging out it is still trying to go to the profile page instead of the home page. When I had edited the php file, this worked correctly. Does it differentiate between logging in and out? Roger, yes I've been copying the templates into the skin folder and editing there. I had to restore a couple from the install zip, but all is now well. I must say that the template method within the skins is a brilliant solution to something that would otherwise be a lot of file copying and moving. Thanks to the guys who made it! Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted February 3, 2009 Administrators Report Share Posted February 3, 2009 I try to make notes of which templates have been edited, so then you can transfer the changes easily. But I recommend using WinMerge or something to see the changes as well. I try not to make too many changes to the front-end templates, but sometimes it's inevitable. Either way, ALL those templates in core/templates are overwritten on an update As for that forwarding, it doesn't differentiate between login and logout. But perhaps I'll just have it forward to the main page all the time. Edit: It is supposed to forward to the main page (this is on logout): Template::Set('redir', SITE_URL); Template::Show('login_complete.tpl'); That redirect on login should really be changed in the login_form.tpl: <input type="hidden" name="redir" value="index.php/profile" /> Quote Link to comment Share on other sites More sharing options...
mw308 Posted February 3, 2009 Report Share Posted February 3, 2009 Thanks Nabeel that works perfectly Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.