do_action( 'pre_network_site_new_created_user',
$email );
$user_id =
username_exists( $domain );
if ( $user_id ) { wp_die( __( 'The domain or path entered conflicts with an existing username.'
) );
} $password =
wp_generate_password( 12, false
);
$user_id =
wpmu_create_user( $domain,
$password,
$email );
if ( false ===
$user_id ) { wp_die( __( 'There was an error creating the user.'
) );
} /**
* Fires after a new user has been created via the network site-new.php page.
*
* @since 4.4.0
*
* @param int $user_id ID of the newly created user.
*/