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

  1. rwignes@gmail.com
    Posted 2 years 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' );

Topic Closed

This topic has been closed to new replies.

About this Topic

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