You can do that hooking into wpmu_new_blog
and then creating the user if it does not exists, and adding that user to the blog being created.
To do so, you will use a code like this ( only for 1 user) , as a network enabled plugin or on the main theme functions.php
add_filter('wpmu_new_blog','wpse_29543_new_blog');
function wpse_29543_new_blog($blogid){
$user_name="user";
$user_password="password";
$user_email="[email protected]";
$role="editor";
$user_id = username_exists( $user_name );
if ( !$user_id ) {
$user_id = wp_create_user( $user_name, $user_password, $user_email );
}
add_user_to_blog( $blogid, $user_id, $role );
}
Related Posts:
- How to migrate wordpress users from one blog to another
- How to add multiple existing users to a multisite site?
- How to auto-generate names for guest users who leave comments?
- WordPress user role with create user capability?
- Change the Author Slug from Username to Nickname
- Is there a is_user_logged_in() for multisite?
- get_user_meta() doesn’t include user email?
- How can 2 blogs share the same users
- Different back-end language for different users?
- Migrating WordPress users into Disqus
- How to display the status of users (online – offline) in archive.php
- How to display custom user meta from registration in backend?
- Grouping users under parent user
- Check if specific username is logged in
- How to update user role without logout
- How to create a public profile for authors/contributors/users?
- Generate WP-CLI @alias for each site on multisite
- How to insert new values to WordPress user Firstname and Surname Fields via DB
- WP_User_Query with combined meta query – not working?
- How to change WordPress user ID?
- How to assign an additional/extra/second user-role to multiple users (of a specific user-role)
- Can I hook into the invite user process to verify their email address is from a certain domain?
- Allowing logged in users to comment without moderation across a multisite installation
- Can you have multi-site WP and keep users separate?
- wp_insert_user is not working for me?
- How to customize wp_signon()
- Is it possible to get a user with just the password field?
- Is there any way to access Ultimate Member’s custom fields?
- New user notification doesn’t include activation link
- Use phpbb user database for WordPress
- User ability to favorite or ‘like’ content
- Users roles, make a page belonging to multiple users
- user-new.php less detailed after WP3.1; how to revert?
- Add custom fields to the user profile
- Undeleting a deleted user
- stop login if user_status equal zero
- How to search users globally on a multisite install?
- Disable user profile editing for one user
- Is it possible to get the currently logged in admin’s IP?
- How do i make my wordpress website private?
- Sort users by userID by default on users.php
- How to delete user on logout and when session expires?
- Remove Capabilities from WP admin for specific user role
- wordpress user roles are not working
- Is there a way to identify a user in a custom REST API method? [duplicate]
- Good way to block users within a multisite setup without deleting them?
- WP_User_Query – searching multiple fields
- wordpress disable login for unverified user
- Problem with automatic role change through cron job
- Profile page for user roles
- Search Function on a plugin WordPress User
- Replace Gravatar with UserPhoto in All Users Coulmn view
- Calling User Nickname
- How redirect after registration?
- create new users in db starting at what ID?
- About WordPress capabilities [closed]
- No more administrator roles / permissions after WordPress upgrade
- How to display text if profile fields are not filled?
- Load user by specific role
- Order users by user role
- Get user by meta key – WP multi site
- Change user slug in Buddypress
- Creating a user from a different website
- Sharing users across multiple sites, each on their own database
- New User Save Filter
- Assigning multiple or additional capabilities to specific users or how to create additional roles like bbpress roles?
- Using get_user in wordpress with sorting
- Using my own user table
- Add number of members to “Right Now” dashboard widget
- How can I add authors in WordPress and assign them a picture?
- add class to element if user is not logged in [closed]
- How to verify which WordPress user requested the API in ASP .NET Core?
- Get users meta and show to attribute
- How can admins to be notified of changes when users change their WP profiles?
- Custom Password Reset
- Can I add a unique code for each user based on the location?
- Can you Recover a WordPress User from a Backup
- wp-admin/users.php Add a column with last name
- Is nicename the same as nickname in WP?
- How to update a user with REST API v2 knowing only the username?
- How do I delete a wordpress user from giant database?
- get_users – Sort by a different meta_value than search criteria
- How to prevent deleteting specific user?
- Display recent members
- Update user counts in admin interface
- Users getting linked unwanted to main mu in WordPress multisite (WPMU)
- How to get the username for a custom link
- WordPress automatic Login on other page?
- Restrict Access to the User Profile
- How do I Limit the number of pages a non-subscriber can see?
- Username has been exposed
- Should I use MultiSite for a subdomain based wp site?
- How create a multisite setup with “phantom” accounts and passwords?
- How To Find The ID Of All Registered Users?
- How to order posts by the user_login that corresponds to a meta_value (which is a user id)?
- How to get only 1 role from user
- Retrieve New user’s ID
- Limit user access to installing/configuring a plugin?
- How to get current user ID in array meta_value?
- Increase by one the user counter on specific role