WordPress.org

Ready to get started?Download WordPress

Forums

Theme My Login
[resolved] Registration redirect prevents confirmation email (3 posts)

  1. lukelukeluke
    Member
    Posted 1 year ago #

    Hi Jeff (and everyone else!)

    Firstly, a fantastic plugin!

    I'm having one small issue. I'm using this code to redirect users after registration, but it is stopping confirmation emails being sent to user and admin. Any ideas how to fix this?

    The code is in theme-my-login-custom.php in the plugins folder

    <?php
    function tml_new_user_registered( $user_id ) {
    
        wp_set_auth_cookie( $user_id, false, is_ssl() );
        wp_redirect( 'http://MYSITE.COM/REDIRECTPAGE/'  );
        exit;
    }
    add_action( 'tml_new_user_registered', 'tml_new_user_registered' );
    ?>

    Thanks

    Luke

    http://wordpress.org/extend/plugins/theme-my-login/

  2. Jeff Farthing
    Member
    Plugin Author

    Posted 1 year ago #

    Attach the callback at a higher priority - the new user e-mail is attached at 10.

    add_action( 'tml_new_user_registered', 'tml_new_user_registered', 11 );
  3. lukelukeluke
    Member
    Posted 1 year ago #

    Works like a charm!

    Thanks Jeff!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic