ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Redirect After Login (extension) - Community Discussion

July 26, 2010 12:45pm

Subscribe [9]
  • #1 / Jul 26, 2010 12:45pm

    Corey Snipes

    34 posts

    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.

  • #2 / Jul 26, 2010 2:39pm

    Matis Masters

    3 posts

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

  • #3 / Jul 26, 2010 3:14pm

    Corey Snipes

    34 posts

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

  • #4 / Jul 26, 2010 3:21pm

    Matis Masters

    3 posts

    Well, I’ll try it right away.

  • #5 / Jul 26, 2010 4:56pm

    Matis Masters

    3 posts

    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?

  • #6 / Jul 27, 2010 1:48am

    John Henry Donovan

    12339 posts

    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

  • #7 / Jul 27, 2010 10:43am

    Corey Snipes

    34 posts

    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.

  • #8 / Oct 07, 2010 12:44pm

    AdamBaney

    65 posts

    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!

  • #9 / Oct 11, 2010 1:55am

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

  • #10 / Oct 11, 2010 11:04am

    AdamBaney

    65 posts

    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!

  • #11 / Dec 30, 2010 10:03am

    Dabbledoo

    172 posts

    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

  • #12 / Jan 04, 2011 9:14pm

    chrcollins

    77 posts

    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!

  • #13 / Mar 26, 2011 10:48pm

    David Hyland

    211 posts

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

  • #14 / Jul 12, 2011 9:11am

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

  • #15 / Oct 27, 2011 4:40pm

    Corey Snipes

    34 posts

    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!

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

ExpressionEngine News!

#eecms, #events, #releases