The auto login feature - Doesnt seem to work.

Hey guys,

I am using this plug-in successfully. I have made a basic modification the 'confirmation' html to redirect to the users dashboard after displaying a short message, instead of displaying the users login details and requiring them to login manually.

Looking at the 'public.removeverification.php' file, it includes this code under the function 'activate_on_blog_signup':

// automatically login the user so they can see the admin area on the next page load
			$userbylogin = get_user_by( 'login', $user );
			if(!empty($userbylogin)) {
				@wp_set_auth_cookie($userbylogin->ID);
				wp_set_current_user($userbylogin->ID);
			}

I would expect this auto login the user on blog creation, but it must not work correctly as the user is not being logged in and is being redirected again to the wp-login page.

Do you know why this may not be working at all, and how I can get this to auto log in the user on blog creation?

The idea is that once the blog has been successfully created a 'success' page displays for a few seconds, then the user is redirected straight to their dashboard without needing to do anything.

Many thanks :slight_smile: