Redirecting after login - want to change it to the "profile" section

Started by sblue, November 12, 2009, 01:36:19 PM

Previous topic - Next topic

sblue

This is probably the most complicated php script I've dealt with, so I was wondering if someone could just tell me where to look for this. All I want to do is make it so that when a person logs in, it redirects them to their profile page instead of the forums. Thanks.

rngrdanny22

isnt there a mod that covers something similar to this? check the modifications section...

good idea by the way!

Arantor

What happens if they're on a topic as a guest then log in? Should it still redirect them to their profile?
Holder of controversial views, all of which my own.



DavidCT

Quote from: rngrdanny22 on November 13, 2009, 11:59:42 AM
that's a good point...  :o

I have no answer to that... hmmm....

When they register a new account, redirect them to their profile :)  I would be interested in that myself, so they'd hopefully add an avatar and other things (lazy bums)

I checked the code myself, but couldn't figure it out - yet...

Arantor

Mostly comes down to whether you're using account activation (via email) or not as to where you insert:
redirectexit('action=profile');
Holder of controversial views, all of which my own.


DavidCT

Quote from: Arantor on November 13, 2009, 03:01:53 PM
Mostly comes down to whether you're using account activation (via email) or not as to where you insert:
redirectexit('action=profile');

Member activation.

Yes, problem is I've looked through Register.php and none of those look like the right one.  Now I'm looking at LogInOut.php...


// Off to the merry board index we go!
if (empty($_SESSION['logout_url']))
redirectexit('', $context['server']['needs_login_fix']);


is that it?

Arantor

No, that's just what happens when you log out.

The code I gave is the code you will need to add in to make it redirect to the profile.

* Arantor tries to remember the process flow of what happens when a user signs up and what URL they are directed to when they have successfully activated their account.
Holder of controversial views, all of which my own.


Advertisement: