WordPress.org

Ready to get started?Download WordPress

Forums

How to automatically login users after signing up (1 post)

  1. rwignes@gmail.com
    Member
    Posted 9 months ago #

    Could anyone suggest how I could have new sign ups automatically login in. As per this linke (http://goo.gl/rmSmwy) I've tried putting the below code provided by the creator of the plugin (Jeff Farthing) into my functions.php but the new sign ups are not automatically logged in:

    function tml_redirect_url( $url, $action ) {
    	if ( 'register' == $action )
    		$url = 'YOUR URL HERE';
    	return $url;
    }
    add_filter( 'tml_redirect_url', 'tml_redirect_url', 10, 2 );
    
    function tml_new_user_registered( $user_id ) {
    	wp_set_auth_cookie( $user_id );
    }
    add_action( 'tml_new_user_registered', 'tml_new_user_registered' );

Reply

You must log in to post.

About this Topic

  • RSS feed for this topic
  • Started 9 months ago by rwignes@gmail.com
  • This topic is not resolved
  • WordPress version: 3.6.1