Check if User exists in WordPress Multisite
You can check existing user with “username_exists” WordPress function and insert user using “wp_insert_user” function as below for Network site also: if( username_exists( ‘username’ ) ) { _e( ‘Username already exists’, ‘your-text-domain’ ); } else { _e( ‘Username does not exists.’, ‘your-text-domain’ ); $userdata = array( ‘user_login’ => ‘username’, ‘user_url’ => ‘http://example.com’, ‘user_pass’ => wp_generate_password(), … Read more