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.

Stand-Alone Registration Form and Redirects

July 13, 2008 6:00pm

Subscribe [3]
  • #1 / Jul 13, 2008 6:00pm

    Michael C.

    29 posts

    I’m trying to figure out how to redirect a user either to the page they were on when they logged in, or to a page I hard-code in the SARF. I also need the redirect to remain intact through the user-email-verification process. As many people have been discovering, the RET value doesn’t seem to do anything.

    I have searched the forums, but there doesn’t seem to be one definitive answer yet. I’m willing to install extensions if that’s what it takes.

  • #2 / Sep 23, 2009 6:33pm

    Sheye Rosemeyer

    39 posts

    Bump **

    Why is there so little information about this.  Redirection is such a simple thing.  It’s stuff like this that makes me wonder why I’m using EE…

    I love EE and the flexibility but it’s the little things that become so time consuming… plugin this / add this module…  great… I’m all for it but come on’... 

    Can we get some basic things working like a simple RET value that works on MSM sites and a login redirect / logout redirect feature.

    Seems pretty basic…

  • #3 / Sep 23, 2009 7:13pm

    Sheye Rosemeyer

    39 posts

    Ok… Throwing out the book…

    I’ve hacked EE core… I had too… The documentation says put in the RET= value and EE will redirect your users…  It doesn’t work.  Don’t waste your time.

    The great plugins out there like First Timer and Solspace’s User doesn’t support MSM so I’ve been forced to modify the member registration.

    Why this isn’t in there… ??? I don’t know.

    Two things listed here… 
    1.  Force email to be used as username
    2.  Redirect user to the RET value

    Around line 345 find this

    if ($_POST['screen_name'] == '')
         $_POST['screen_name'] = $_POST['username'];

    Replace with this:

    if ($_POST['username'] == '')
         $_POST['username'] = $_POST['email'];
            
    if ($_POST['screen_name'] == '')
         $_POST['screen_name'] = $_POST['username'];

     

    Now remove the username validation near line 379

    $VAL->validate_username();

    Replace with this

    //$VAL->validate_username();

     

    Now force the redirection by finding this on line (840-ish)

    'redirect'    => ,

    replace with this

    'redirect'    => $_POST['RET'],

    There you have it.  Now in the standalone registration form just don’t add in the username but make sure you require the email

  • #4 / Sep 23, 2009 7:28pm

    Sheye Rosemeyer

    39 posts

    Only issue I’ve found with this above is it does not log the user in manually.

    The value of controlling the redirect is important though so i don’t mind asking them to login.

    Any help on why this doesn’t work would be great.
    There is an area of the page where the session is created but for some reason… possibly the redirect causes the session to not get set properly…

    Help me out any EE experts…

  • #5 / Sep 23, 2009 8:01pm

    Sheye Rosemeyer

    39 posts

    Getting SLAP Happy here…

    On MSM - If you do what I propose the new registrant is NOT logged in..  No biggie they can just login at the top.

    BUT

    The redirect on the login form doesn’t work and redirects back to the site index. ...

    If you remove the “$conf[‘multi_login_sites’]” from config.php the login redirect works but now you’ve got a crap load of organization to ahchieve what should be basic with a $$$ Licensed system.

    Here is my fervent request:

    1.  MSM supported RET - return / redirect on registration
    2.  MSM supported Redirect on Login form
    3.  A flipping simple configuration for session handling.  It’s a nightmare trying to sort out MSM sessions and allowing multi site logins…

    If these three things were simple to implement and worked flawlessly across MSM I for one would use EE more… Until then I’m looking elsewhere for better solutions.

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

ExpressionEngine News!

#eecms, #events, #releases