• Hello,

    I want my new users to e automatically logged in after they register.
    Right now, they are directed to the login screen.

    I’ve created a theme-my-plugin-custom.php and placed in my plugins directory.

    I followed the code in this:

    It didn’t work for me.

    I followed the code this:

    This is what’s currently in my custom.php file:

    <?php
    function tml_new_user_registered( $user_id ) {
    	wp_set_auth_cookie( $user_id, false, is_ssl() );
        wp_redirect( admin_url( 'profile.php' ) );
        exit;
    }
    add_action( 'tml_new_user_registered', 'tml_new_user_registered' );
    ?>

    Not sure what else to do! Really like this plugin but want users not have to enter the same details twice.

    Please help – thanks!

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

  • The topic ‘Auto-Login after Registration’ is closed to new replies.