Home Forums Newsletter Plugin Support WordPress Auto-Login Confirguration With Newsletter

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #334888
    support
    Participant

    Here is my site address: https://noaiallowed.com

    Visitors submit the only form on that page and then get forwarded to the next page /select-membership and right after they make their choice and submit, I have applied code to the functions.php file that automatically logs them into the site. Otherwise, it's not as simple for them to register their shop and they must know to login first, in order to do so.

    Unfortunately, when this code is applied and since they are automatically logged in, their email/name do not get automatically dropped into my linked Newsletter mailing list and none of the corresponding autoresponder emails get sent, so this is a problem.

    Is there any code that I can add, or a plugin to make this work, understanding that I want all new registered users to be automatically logged in?

    I couldn't find an answer after searching for several hours on the internet about this.

    Looking forward to hopefully uncovering a solution.

    Thanks,
    Rich.

    #334889
    Stefano
    Keymaster

    Hi, but the registration of users (not subscribers) is managed using the WP registration standard functions? If so, using our wp users addon (or the wp user's pro version since you have the autoresponder hence I imagine you have a valid license), the subscriber can be created during the registration.

    #334970
    support
    Participant

    I already have the WP Users Addon activated. However, I need to add code to the functions.php file that's stored within the child theme folder, so that those who register by first submitting the form here https://noaiallowed.com, to then get forwarded to here https://noaiallowed.com/select-membership (to select their choice of membership) can be automatically logged in. Yet, due to making that automatic login function to happen, it causes the error where the new registered user's email/name doesn't automatically go in the Newsletter plugin list, nor do they receive any of the autoresponder emails.

    Understanding this, how can we stop that from happening so new registered users can be automatically logged in and also be added the the Newsletter mailing list?

    Your help with this is appreciated as I cannot find the answer through any of your tutorials...

    #334976
    support
    Participant

    P.S. This is the PHP code that I have applied to successfully auto login new users, but then I need to manually enter their email into the Newsletter Plugin mailing list in order for them to get added and receiving the autoresponder emails...

    function auto_login_new_user( $user_id ) {
    wp_set_current_user($user_id);
    wp_set_auth_cookie($user_id, false, is_ssl()) ;
    wp_redirect( 'https://noaiallowed.com/watch-the-video-tutorial' );
    exit;
    }
    add_action( 'user_register', 'auto_login_new_user',10,1 );

    #335154
    Michael
    Keymaster

    Hello,

    Wp Users addon should add a new subscriber to Newsletter every time a new user gets registered, even if it gets redirected by your function. Is this not happening?

    Michael

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.