4 of 4
4
New Extension Completed!! - Logout Redirect
Posted: 12 May 2008 12:57 PM   [ Ignore ]   [ # 55 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1925
Joined  08-02-2006

Hey Mark. I’m using it to redirect the user back to the page they were one before they clicked “logout.” By default, from what I can tell, EE will redirect the user to the homepage once they have logged out and I don’t like that functionality.

So, here’s what I’ve got:

{if segment_1 != ""}
{exp
:logout_redirect url="http://www.domain.com/{segment_1}" text="Logout" styles="class="logout-link-class"}
{if:elseif segment_2 != ""}
{exp:logout_redirect url="
http://www.domain.com/{segment_1}/{segment_2}/{segment_3}" text="Logout" styles="class="logout-link-class"}
{if:elseif segment_3 != ""}
{exp
:logout_redirect url="http://www.domain.com/{segment_1}/{segment_2}/{segment_3}" text="Logout" styles="class="logout-link-class"}
{/if}
 Signature 

Deron Sizemore
==========
LogoGala | Kentucky Golfing
Twitter: Deron Sizemore | LogoGala

Profile
 
 
Posted: 12 May 2008 01:51 PM   [ Ignore ]   [ # 56 ]  
Professor
Avatar
RankRankRankRankRankRankRank
Total Posts:  10769
Joined  04-15-2006

Hi Deron,

Thanks for letting me know. Always nice to see how these things are being used. Yep it is nice to be able to re-direct people to where they just were instead of the usual behaviour which I think can in certain cases be a little disconcerting. Glad it’s all working for you now.

Best wishes,

Mark

 Signature 

Shopping Cart Plugin
Full list of add-ons
———————————————————-
Buy me a drink, or two if you like!!

Profile
 
 
Posted: 06 July 2008 01:19 PM   [ Ignore ]   [ # 57 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  106
Joined  04-12-2008

Quick question, if I specify the {exp:logout…} in one template should I be able to specify it again in another template to get a different redirect at that time or am I only supposed to set this once in 1 template and thus I can only redirect on logout to one page of my choosing?  When I try multiple times I go in a what seems to be a re-direct loop.

 Signature 

“You can’t fall off the floor” - Paul’s Law
“Brawndo, It’s what plants crave!” - Idiocracy

Profile
 
 
Posted: 21 July 2008 09:03 AM   [ Ignore ]   [ # 58 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  342
Joined  10-24-2007

Has anyone gotten an error message from this since upgrading to 1.6.4?

 Signature 

About Zac Gordon | High School and College Web Development Teacher | @zgordon

Profile
 
 
Posted: 25 July 2008 10:11 PM   [ Ignore ]   [ # 59 ]  
Summer Student
Avatar
Total Posts:  17
Joined  01-21-2008

I’m using it, and have upgraded to 1.6.4 - no problems here, maybe if you list your extensions, someone could see why this is failing for you.

Profile
 
 
Posted: 05 September 2008 05:27 PM   [ Ignore ]   [ # 60 ]  
Lab Assistant
RankRank
Total Posts:  285
Joined  07-30-2008

Any idea why this works:

{if segment_1 != ""}
{exp
:logout_redirect url="http://www.mydomain.com/addons/ee/{segment_1}" text="logout" styles=""}
{if
:elseif segment_2 != ""}
{exp
:logout_redirect url="http://www.mydomain.com/addons/ee/{segment_1}/{segment_2}" text="logout" styles=""}
{if
:elseif segment_3 != ""}
{exp
:logout_redirect url="http://www.mydomain.com/addons/ee/{segment_1}/{segment_2}/{segment_3}" text="logout" styles=""}
{
/if}

But this doesn’t?

{if segment_2 != ''}
{exp
:logout_redirect url="{path={segment_1}/{segment_2}}" text="" styles=""}
{if
:elseif segment_1 != ''}
{exp
:logout_redirect url="{path={segment_1}}" text="" styles=""}
{
/if}

or, better yet, this?

{exp:logout_redirect url="{path={segment_1}{if segment_2}/{segment_2}{/if}}" text="" styles=""}
Profile
 
 
Posted: 15 September 2008 04:29 PM   [ Ignore ]   [ # 61 ]  
Lab Assistant
RankRank
Total Posts:  285
Joined  07-30-2008

strange error when loading a page with logout redirect (only happens in IE):

MySQL ERROR:

Error Number: 1062

Description
: Duplicate entry '1' for key 1

Query
: INSERT INTO exp_logout_redirect_url SET member_id = '1', redirect_url = 'http://mysite.com/addons/ee/blog/categories/category/'

any clue what’s happening?

Profile
 
 
Posted: 19 December 2008 07:21 PM   [ Ignore ]   [ # 62 ]  
Lab Assistant
RankRank
Total Posts:  285
Joined  07-30-2008

Note that if I log in as the same user on two machines, I tend to see a “Duplicate Query” error, attributed to the Logout Redirect plugin.

Seems like the query needs to be smarter about considering IP address as well as userid to avoid such conflicts?

Profile
 
 
Posted: 07 January 2009 06:32 PM   [ Ignore ]   [ # 63 ]  
Lab Assistant
RankRank
Total Posts:  285
Joined  07-30-2008

more detail on bug reported previously:

below is the error that is generated

MySQL ERROR:

Error Number: 1062

Description
: Duplicate entry '1' for key 1

Query
: INSERT INTO exp_logout_redirect_url SET member_id = '1', redirect_url = 'http://mydomain.com/mypath/'

anyone else seeing this? hello?

Profile
 
 
Posted: 31 May 2009 09:07 PM   [ Ignore ]   [ # 64 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  482
Joined  12-08-2007

I can verify that this plugin does work with 1.6.7 just fine. No problems whatsoever.

Thanks Mark for helping me out in a pinch.  cheese

 Signature 

You’re unique! Just like everybody else.

Profile
 
 
Posted: 03 August 2009 07:18 PM   [ Ignore ]   [ # 65 ]  
Grad Student
Rank
Total Posts:  99
Joined  01-09-2009

Can’t see what I’m doing wrong.  I want to redirect back to the page that the person logged out of and {segment_X} doesn’t work.  Here is the code, basically straight from the Forum Module Top Bar plus logout-redirect.  I do have the Forum running through EE template, so tags are working and the logout-redirect works, but not with the segment.  Platform is always segment_1.
Here is the URL it returns: http://domain.com/platform/{segment_2}

{if logged_in}
    
<table border="0" cellspacing="0" cellpadding="0" align="right">
<
tr>
    <
td><span id="s2">{lang:logged_in_as}<b>{screen_name}</b></span></td>
    <
td>{exp:logout_redirect url="http://domain.com/platform/{segment_2}" text="LOG OUT" styles="class='logout-link-class' title='Logout Link'"}</td>
Profile
 
 
Posted: 11 December 2009 05:38 PM   [ Ignore ]   [ # 66 ]  
Grad Student
Rank
Total Posts:  85
Joined  01-24-2006

I am having the same issue as @xqzzzme, running EE 1.6.8.
The {segment_x} variable is ignored and furthermore, even if I hardcode a url, when I click the logout link it goes to http://www.mysite.com/?ACT=10 and then if I navigate back to the page I am still logged in?!?!

 Signature 

Vibe9 Design - Vancouver Web Design Company

Profile
 
 
   
4 of 4
4
 
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 1743, on December 02, 2009 03:47 PM
Total Registered Members: 120044 Total Logged-in Users: 48
Total Topics: 126169 Total Anonymous Users: 36
Total Replies: 663631 Total Guests: 391
Total Posts: 789800    
Members ( View Memberlist )