Jump to content

Recommended Posts

  • Moderators
Posted

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.

Posted

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.

  • 2 weeks later...
Posted

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?

  • Administrators
Posted

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

Posted

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!

  • Administrators
Posted

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" />

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...