Forum Replies Created

Viewing 1 replies (of 1 total)
  • Thread Starter dougar

    (@dougar)

    Hi Adam. Thanks for replying so quickly, and with a solution!

    I upgraded the clone area to Defender 4.5.1 (nice that a new release just came out today!) And I followed your instructions above. During my testing, I realized it does exactly what I asked for… after registration, it redirects the user to the masked login page. But now I realize that isn’t what I want. I want it to work like it does in Defender 4.0.2, which is to redirect the user to the page with this “success” message:

    Registration complete. Please check your email, then visit the login page.

    In other words, instead of redirecting to here:
    https://example.com/clone123/wp-login.php?checkemail=registered (the original problem)
    and instead of redirecting here:
    https://example.com/clone123/maskingslug/ (what I asked for above)
    I actually want it to redirect to:
    https://example.com/clone123/maskingslug?checkemail=registered

    So I took the liberty of changing the last part of your code slightly, 
    from:
       return home_url().'/slug/';
    }
    to:
       return home_url().'/slug?checkemail=registered';
    }

    The entire piece of code is:

    <?php 
    add_filter( 'registration_redirect', 'redirect_masked_registration', 11, 1 );
    function redirect_masked_registration( $registration_redirect ) {
    	return home_url().'/slug?checkemail=registered';
    }
    

    It seems to work great. 🙂
    I realize it is not elegant… I have hardcoded the part from the question mark onward, assuming the registration will be successful. But for my website’s purpose, this should be fine.

    Thanks again. I’ll be upgrading to Defender 4.5.1 in production with the new MU code.
    Have a great day.
    Doug

Viewing 1 replies (of 1 total)