Jump to content

When login redirect to Pilot Profile


mark1million

Recommended Posts

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.

Link to comment
Share on other sites

  • 2 weeks later...

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?

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

  • Administrators

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

Link to comment
Share on other sites

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...