Tips and Tricks HQ Support

Support site for Tips and Tricks HQ premium products

  • Home
  • Contact Us
  • Documentation
  • Forum Home
    • Forum
    • Forum Search
    • Forum Login
    • Forum Registration

Post-registration redirect

by

Tips and Tricks HQ Support Portal › Forums › WP eMember › WP eMember Tweaks › Post-registration redirect

Tagged: automatic login redirect

  • This topic has 27 replies, 11 voices, and was last updated 10 years, 9 months ago by wzp.
Viewing 15 posts - 1 through 15 (of 28 total)
1 2 →
  • Author
    Posts
  • March 31, 2010 at 1:23 pm #1005
    GraphicBass
    Member

    I’ve created a registration page that displays if a visit attempts to access protected content with the registration shortcode.

    It works well, but remains on the same page, with the same “please register” message, after a successful registration.

    Is there a way to re-direct the visitor to a page when registration is complete (a “successful registration” page) rather than remain on the same page?

    Thanks!

    gary

    April 1, 2010 at 7:05 am #19290
    amin007
    Participant

    After a successful registration the registration form will disappear telling you that the registration was successful and it will show a link for the login page. Is this not happening? if not please post the eMember version you are using.

    April 1, 2010 at 9:54 pm #19291
    GraphicBass
    Member

    Actually, that is what is happening, so it’s working correctly. It a small line under my headline with the success message and log-in link.

    I’d like to do is a re-direct to a log-in page instead of just displaying the message on the “same” page, so visitors/members are not confused by the headline and miss the small type (which I know I can make larger using CSS, but would still rather have a separate page).

    Thanks!

    gary

    April 2, 2010 at 3:11 am #19292
    amin007
    Participant

    You can tweak the code to achieve what you want. This is what you will have to do…

    1) Open the “eMember_misc_functions.php” file.

    2) Search for the following bit of code in that file:

    $redirect_page = $emember_config->getValue('login_page_url');
    if (!empty($redirect_page)) $output .= EMEMBER_PLEASE.' <a href="'.$redirect_page.'">'.EMEMBER_LOGIN.'</a>';

    3) Once you find it then change it with the following code:

    $redirect_page = $emember_config->getValue('login_page_url');
    header("Location: ".$redirect_page);
    exit;

    April 2, 2010 at 5:08 am #19293
    GraphicBass
    Member

    Thanks very much!

    gary

    December 31, 2010 at 9:42 am #19294
    sgrpublishing
    Member

    Hi Just found this post as I wanted to implement the same thing as Gary did however, after finding the code and replacing it all I get is this error message:

    Fatal error: Call to a member function getValue() on a non-object in /home/mikeruffles/theprimarysecret.com/wp-content/plugins/wp-eMember/eMember_misc_functions.php on line 412

    Perhaps you can help and tell me where I am going wrong.

    Thanks

    Mike

    January 1, 2011 at 2:34 am #19295
    amin007
    Participant

    What version of eMember are you using?

    January 1, 2011 at 9:29 am #19296
    sgrpublishing
    Member

    This from the Dashboard

    WP eMembers – Dashboard v5.9.8

    January 2, 2011 at 3:10 am #19297
    amin007
    Participant

    Try $emember_config instead of $config

    I have updated the code example above.

    January 2, 2011 at 9:04 am #19298
    sgrpublishing
    Member

    Tried that but now getting this error:

    Warning: Cannot modify header information – headers already sent by (output started at /home/mikeruffles/theprimarysecret.com/wp-content/plugins/wp-eMember/emember_password_sender_box.php:13) in /home/mikeruffles/theprimarysecret.com/wp-content/plugins/wp-eMember/eMember_misc_functions.php on line 413

    January 2, 2011 at 1:22 pm #19299
    amin007
    Participant

    When you modified the file did you introduce spaces in the .php file? That is one reason for this kind of the error. What editor do you use to modify the .php files?

    January 3, 2011 at 12:49 pm #19300
    sgrpublishing
    Member

    I used the wordpress built in plugin editor, selecting the eMember_misc_functions.php file, then searching for the code:

    $redirect_page = $emember_config->getValue(‘login_page_url’);

    if (!empty($redirect_page)) $output .= EMEMBER_PLEASE.’ ‘.EMEMBER_LOGIN.’‘;

    And then replacing it with this one.

    $redirect_page = $emember_config->getValue(‘login_page_url’);

    header(“Location: “.$redirect_page);

    exit;

    That’s all, sfter saving the file the error comes up when I fill in the registration form and press Register.

    By the way the newly registerd members are not passed to my Getresponse autoresponder account as well but I opened a new thread on this a couple of days ago.

    January 4, 2011 at 4:39 am #19301
    amin007
    Participant

    I will send you an email to get site access so I can check this out.

    February 3, 2011 at 7:07 am #19302
    bdeshazer
    Member

    fyi, I wanted this functionality too and ran into the same header problem, so I just tried the following two solutions and both seemed to work:

    $redirect_page = $emember_config->getValue(‘login_page_url’);

    if (!empty($redirect_page)) echo ‘<script language=”Javascript”>window.location=”‘.$redirect_page.'”;</script>’;

    and

    $redirect_page = $emember_config->getValue(‘login_page_url’);

    if (!empty($redirect_page)) echo ‘<META HTTP-EQUIV=”Refresh” Content=”0; URL=’.$redirect_page.'”>’;

    I’m sticking with the javascript solution for now.

    Brent

    June 6, 2011 at 10:11 am #19303
    frantan
    Member

    Hi,

    I would like to automatically redirect people after they have registered to a welcome message page rather than the generic login page. How would I modify the code to do this please?

    Many Thanks

  • Author
    Posts
Viewing 15 posts - 1 through 15 (of 28 total)
1 2 →
  • You must be logged in to reply to this topic.
Log In

Forum Related

  • Forum Home
  • Forum Search
  • Forum Registration
  • Forum Login

Support Related Forms

  • Contact Us
  • Customer Support
  • Request a Plugin Update
  • Request Fresh Download Links

Useful Links

  • Plugin Upgrade Instructions
  • WP eStore Documentation
  • WP eMember Documentation
  • WP Affiliate Platform Documentation
  • Tips and Tricks HQ Home Page
  • Our Projects

Quick Setup Video Tutorials

  • WP eStore Video Tutorial
  • WP eMember Video Tutorial
  • WP Affiliate Platform Video Tutorial
  • Lightbox Ultimate Video Tutorial

Our Other Plugins

  • WP Express Checkout
  • Stripe Payments Plugin
  • Simple Shopping Cart Plugin
  • Simple Download Monitor

Copyright © 2025 | Tips and Tricks HQ