WordPress Multisite – When a user signs-up on main site, how to add the user to a subsite
Run add_user_to_blog() after user creation. You can hook on user_register() to get newly created user ID and pass it and any conditional assignments to your callback that runs add_user_to_blog().