Redirect After Login (extension) - Community Discussion
Posted: 26 July 2010 10:45 AM   [ Ignore ]  
Grad Student
Avatar
Rank
Total Posts:  37
Joined  04-10-2008

A couple of years ago, I created the Redirect After Login extension to provide some additional control over behavior after user login or logout.  This was useful to us, and others in the EE community soon let us know that it was useful to them as well.  Several people have contributed fixes and improvements, and many have contributed valuable feedback.

This extension may not work properly on sites using MSM/multisite or EE forums.  That said, it works quite well for most sites, and even made it into someone’s top ten list.

Redirect After Login is free to download, use, modify, or distribute.  It allows you to specify the following behaviors:

- Whether to display the confirmation page after user login
- Whether to display the confirmation page after user logout.
- Whether to direct user to previous page or a set destination.
- Destination after user login.
- Destination after user logout.

Both EE1 and EE2 versions are here on the devot:ee listing:

http://devot-ee.com/add-ons/login-redirect

This is a free addon, so support is pretty limited.  Please post support and feature requests in the devot:ee listing, at the link above.

 Signature 

ExpressionEngine Addon Development and Performance Research

Profile
 
 
Posted: 26 July 2010 12:39 PM   [ Ignore ]   [ # 1 ]  
Summer Student
Avatar
Total Posts:  3
Joined  06-11-2010

@Corey

We are having an issue regarding your plugin, when we set the extension to NOT show the confirmation page after login, it always redirect to the homepage, instead of the last page visited.

The logout redirect is working ok, even if the confirmation page is displayed or not.

If we set to SHOW the confirmation page after login, it does redirect correctly to the last visited page.

So I’m thinking maybe its a problem with the $FNS->redirect, because it works when the confirmation page is displayed. But I couldn’t find a solution.

Any ideas?

We are using EE 1.6.9, with the 1.2.0 extension

Thanks.

 Signature 

Of course you can. I’m not questioning your powers of observation, I’m merely remarking upon the paradox of asking a masked man who he is.

Profile
 
 
Posted: 26 July 2010 01:14 PM   [ Ignore ]   [ # 2 ]  
Grad Student
Avatar
Rank
Total Posts:  37
Joined  04-10-2008

(removing the original response, as EE forums should no longer be used for addon tech support)

 Signature 

ExpressionEngine Addon Development and Performance Research

Profile
 
 
Posted: 26 July 2010 01:21 PM   [ Ignore ]   [ # 3 ]  
Summer Student
Avatar
Total Posts:  3
Joined  06-11-2010

Well, I’ll try it right away.

 Signature 

Of course you can. I’m not questioning your powers of observation, I’m merely remarking upon the paradox of asking a masked man who he is.

Profile
 
 
Posted: 26 July 2010 02:56 PM   [ Ignore ]   [ # 4 ]  
Summer Student
Avatar
Total Posts:  3
Joined  06-11-2010

Well I found this now:
Login and logout behave the same. They both redirect wrong.
When I set to SHOW the confirmation page, the redirection goes to the right URL, but it does not refresh the page to show the changes to the login user. Just like if I did history.back() on JS.

When I set to NOT show the confirmation page (the setting I want to work), it redirects to the homepage.

Do you need any more info about the install?

 Signature 

Of course you can. I’m not questioning your powers of observation, I’m merely remarking upon the paradox of asking a masked man who he is.

Profile
 
 
Posted: 26 July 2010 11:48 PM   [ Ignore ]   [ # 5 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  14990
Joined  03-22-2004

Corey,

I am moving this thread to our Community News forum which is now the appropriate place for an announcement like this. See our Community News Guidelines

 Signature 

Recent version: EE 2.3.1  - 2.x Bug Tracker | HowTo Post a Support Request | Version Upgrade | Change Log for 2.3.1

Profile
 
 
Posted: 27 July 2010 08:43 AM   [ Ignore ]   [ # 6 ]  
Grad Student
Avatar
Rank
Total Posts:  37
Joined  04-10-2008

Oops!  Sorry about that; I tried to figure out which forum was most appropriate for this and it looks like I missed the mark.  Thanks for the pointer to the guidelines as well…  I’ve rewritten the top message to better suit the intent of the forum, and asked people to NOT post support issues here.  Thanks John.

 Signature 

ExpressionEngine Addon Development and Performance Research

Profile
 
 
Posted: 07 October 2010 10:44 AM   [ Ignore ]   [ # 7 ]  
Grad Student
Avatar
Rank
Total Posts:  93
Joined  12-08-2007

Great add-on. I used it in version 1.x, but for some reason in 2.x, it doesn’t seem to work. I get an error message that states:

An Error Was Encountered

Unable to load the requested language file: language/english/twomile_login_redirect_lang.php

I know that I uploaded the language file to the correct English directory. I even double-checked and re-uploaded.

Do you know what’s going on? Thanks!

 Signature 

BaneyDesign.com   |   Skype: baney.design

Profile
 
 
Posted: 10 October 2010 11:55 PM   [ Ignore ]   [ # 8 ]  
Summer Student
Total Posts:  1
Joined  09-28-2010

Panhead, this might be a band-aid temporarily, but I had to rename my language file to “twomile_login_redirect_lang.png”

Profile
 
 
Posted: 11 October 2010 09:04 AM   [ Ignore ]   [ # 9 ]  
Grad Student
Avatar
Rank
Total Posts:  93
Joined  12-08-2007

Thanks, T2 + Back Alley Films. Your suggested rename didn’t work for me, but when I renamed the file to “twomile_login_redirect_lang.php” it worked! You did help me. Thanks!

 Signature 

BaneyDesign.com   |   Skype: baney.design

Profile
 
 
Posted: 30 December 2010 09:03 AM   [ Ignore ]   [ # 10 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  219
Joined  10-24-2006

Hi Corey -

Your extension for EE2 works like a charm!  There was only two issues I found thus far that I figured you would want to know about - and both had to do with the language file.

There are two fixes that I made that made everything work:

1) The name of the language file is not correct.  Instead of lang.twomile_login_redirect.php, it needs to be twomile_login_redirect_lang.php.  I believe the only thing that won’t work without this change is the Extension Settings page.

2) The array in the language file needs to be called $lang instead of $L like in EE 1.6x

Hope this helps!  And if you don’t have time to make the fix, I hope this helps anyone else that needs to use it on an EE2 project!

Regards,

Doug

 Signature 

dabbledoo.com | .(JavaScript must be enabled to view this email address)

Member of the EE Pro Network

Profile
 
 
Posted: 04 January 2011 08:14 PM   [ Ignore ]   [ # 11 ]  
Lab Assistant
RankRank
Total Posts:  102
Joined  04-17-2010

Tried the twomile login redirect and when I logged out it complained that site/index was not a valid path 404 error.  I tried to login into the control panel and the login worked but it just kept returning to the login screen.  Effectively I was locked out of the control panel.  Fortunately another developer was logged in as admin and they disabled twomile extension and I am back in.  I am afraid to use this extension now .... ....


  What could I have done in that simple setting screen to cause this.  Why didn’t site/index work.  (i use site as my template group and I have an index.php file and no rewrite).  I assumed this feild is template_group/template format.

  Thanks!

Profile
 
 
Posted: 26 March 2011 08:48 PM   [ Ignore ]   [ # 12 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  179
Joined  01-12-2010

@Dabbledoo: Thanks your tips got me up and running immediately!

@chrcollins: Try removing “site/index” altogether and just leaving it blank or “/” for the homepage.

Profile
 
 
Posted: 12 July 2011 07:11 AM   [ Ignore ]   [ # 13 ]  
Summer Student
Total Posts:  3
Joined  04-03-2011

it also doesn’t go in your extensions folder, it goes in your third party folder after naming the folder “twomile_login_redirect”

Profile
 
 
Posted: 27 October 2011 02:40 PM   [ Ignore ]   [ # 14 ]  
Grad Student
Avatar
Rank
Total Posts:  37
Joined  04-10-2008

Quick update, and very sorry for the delay… I’ve updated this extension to use the proper EE2 installation method, language file name, etc.  Apologies and great kudos to all of the folks who worked through that on your own.  You’re saints.

The latest version is posted on devot:ee, here:  http://devot-ee.com/add-ons/login-redirect

If you are using an older version of the extension with EE2, please:

a) Remove it
b) Visit the devot:ee link above and download the latest version
c) Install using the instructions in readme.txt

Thanks!

 Signature 

ExpressionEngine Addon Development and Performance Research

Profile