In my multisite i'm using a custom blog registration using :
wpmu_signup_blog($domain, $path, $blog_title, $user_name, $user_email, $meta);
and the site creation is successfull.
and i want users automatically sign into their site admin panel on signup,for that i use :
$creds = array();
$creds['user_login'] = $_POST['username'];
$creds['user_password'] = $_POST['password'];
$creds['remember'] = true;
$user = wp_signon( $creds, false );
if ( is_wp_error($user) )
echo $user->get_error_message();
But this will return an error :
ERROR: The password you entered for the username mysite is incorrect. Lost your password?
i need auto signin without using a plugin!!!
Please help...