Need to change the logout redirect
Posted: 31 August 2004 09:21 AM   [ Ignore ]  
Summer Student
Total Posts:  25
Joined  04-27-2003

I currently have three blogs. Whenever I logout of any one of the blogs I am redirected to the default blog.  Can I change this so that I am redirected to my website home page which is outside of the ee? Thanks.

 Signature 

“I’m going on a Toe Quest!”

Profile
 
 
Posted: 31 August 2004 03:03 PM   [ Ignore ]   [ # 1 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  7534
Joined  08-05-2002

It is written into the scripts that logging out sends a user to the site url for the index page of the ExpressionEngine site.  Right now, the only way to change that is by modifying the member_logout function in mod.member.php.

 Signature 
Profile
 
 
Posted: 31 August 2004 03:45 PM   [ Ignore ]   [ # 2 ]  
Summer Student
Total Posts:  25
Joined  04-27-2003

I modified the function and it is working as I want.  It looks like the ‘site_url’ is reference frequently and seems like I’ll be ending up at the site url in situations that are inappropriate for my website.

A more general question… I’ve been viewing ee as a blog tool and the blog is only a small part of my website. I’ve been attempting to reach into ee to pull out the content I need for my website homepage. I’m wondering if I should treat ee as more of a content management system and just move my home page into ee and make it my site_url. Seems like it may work better that way and I don’t have to make so many hacks. Do you agree? 

 Signature 

“I’m going on a Toe Quest!”

Profile
 
 
Posted: 31 August 2004 03:49 PM   [ Ignore ]   [ # 3 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  7534
Joined  08-05-2002

Unless you can think of a good reason not to move your homepage into EE, then I would suggest you move it into the program.  Nevin is using ExpressionEngine for a great part of pMachine Hosting’s site (and he has more planned), and there is not a single blog anywhere on the site.  Many other people are doing the same.

 Signature 
Profile
 
 
Posted: 31 August 2004 05:42 PM   [ Ignore ]   [ # 4 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  308
Joined  07-26-2003

I want the member to return to the page that they logged out from, but in a logged out state. . .

I found this:  ‘redirect’ => $PREFS->ini(‘site_url’), , but I’m not sure what to replace the “site_url” with. . .

I’m glad you posted this. . . I have had the same question.

Profile
 
 
Posted: 08 September 2004 01:28 PM   [ Ignore ]   [ # 5 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  308
Joined  07-26-2003

Does anyone know how to change the logout redirect?  I want my users to return to the page they logged out from.

Profile
 
 
Posted: 08 September 2004 01:34 PM   [ Ignore ]   [ # 6 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  7534
Joined  08-05-2002

Try replacing $PREFS->ini(‘site_url’); with this:

$FNS->form_backtrack(‘2’);

 Signature 
Profile
 
 
Posted: 08 September 2004 03:58 PM   [ Ignore ]   [ # 7 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  308
Joined  07-26-2003

Paul, thanks for that hack.  I didn’t get a chance to try it because I stumbled on to something else that worked for what I wanted to do. . . so for the sake of anyone else that is in the same boat, here is what I did:

I had two templates:

1)  www.personalsite.com
2)  www.personalsite.com/work

When someone logged off from site #2, they were directed to site #1.  Why? Because the site url is defined as www.personalsite.com.

The solution was to follow the directions here to set-up site #2 as a subdomain.  This gives you an opportunity to re-define the site url in the path.php file—in my case, www.personalsite.com/work. 

So now if a member logs out of site #2, they are redirected to site #2.

Profile
 
 
Posted: 08 September 2004 07:47 PM   [ Ignore ]   [ # 8 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  6077
Joined  08-04-2002

Paul...Thanks for the tip.
I changed it per your post…any ramifications we need to be aware of?
——-
FYI…In the file it ends with a comma (,) rather then a semi-colon (;) and to make it refresh/redirect to the very same page they left, it had to be (1) instead of (2). At least for me grin

Profile
 
 
Posted: 08 September 2004 07:50 PM   [ Ignore ]   [ # 9 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  7534
Joined  08-05-2002

There are no ramifications that I can think of, and both of your fixes sound right.

 Signature 
Profile
 
 
Posted: 08 September 2004 09:24 PM   [ Ignore ]   [ # 10 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  6077
Joined  08-04-2002

Paul...Super!

Profile
 
 
Posted: 24 February 2006 12:08 AM   [ Ignore ]   [ # 11 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  15408
Joined  05-15-2004

OK, so this is an old thread, but ... I am now in the position that I’d also want/need to change the logout on a per weblog basis. If there is a feature request for this, I’d like to second it. If there’s not, I’d be happy to make one.

For the time being, a hack would do. Looks like the member_logout function changed a bit since that thread?

My question is: How can I have users directed to an URL different from the site url after they logut? Any per-weblog URL (trackback URL, eg.) would be fine.

I am running 1.4.1 and the latest build.

 Signature 

Everything will be good in the end. If it’s not good, it’s not the end.

Profile
MSG
 
 
Posted: 28 February 2006 02:31 PM   [ Ignore ]   [ # 12 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  15408
Joined  05-15-2004

No takers? I’ll make it a feature request then.

 Signature 

Everything will be good in the end. If it’s not good, it’s not the end.

Profile
MSG
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 09:33 AM
Total Registered Members: 64978 Total Logged-in Users: 26
Total Topics: 82014 Total Anonymous Users: 15
Total Replies: 440812 Total Guests: 188
Total Posts: 522826    
Members ( View Memberlist )