I'm using this function in functions.php to auto log in users after the sign up in the front-end
function auto_login_new_user( $user_id ) {
wp_set_current_user($user_id);
wp_set_auth_cookie($user_id);
wp_redirect('http://mydomain.com/confirmation/');
exit;
}
add_action( 'user_register', 'auto_login_new_user' );
This works great for auto login in users but for some reason this also causes the automatic confirmation email not being sent to users anymore. I have no idea why though, any suggestions would be really helpful.
Thanks