The following code works for me:
add_action( 'wpmu_activate_user', 'myplugin_registration_save', 10, 1 );
function myplugin_registration_save( $user_id ) {
$blog_id = 13;
add_user_to_blog($blog_id, $user_id, "subscriber");
}
Related Posts:
- How do I remove/delete an old super admin user?
- Is there any central control/access panel for several WordPress sites?
- Delete sites in wordpress multisite (not suspend)
- How to synchronize user profile fields in multisite?
- Get first_name and last_name on user_register hook
- User registration on subsite in multisite configuration
- Lock one of WP Network sites for not registered users
- Can you have multi-site WP and keep users separate?
- Multisite Independent User Base
- Can wp-cli display all users and their roles across all sites in a multisite instance?
- How do I use different domain for subdomains in WP Multisite?
- Deleting a user in multisite
- how do I configure nginx for wordpress multisite, it occurs ERR_TOO_MANY_REDIRECTS
- How do I list multisite users for the current site only
- Assign role to user on first login, if they are first (after admin)
- How to change user starting role in WordPress MultiSite?
- What is meant by Multisite in WordPress?
- Add menu items/actions for multisite users who are registered on the network but do not have a role or capability in any sites
- Multisite User Sync Question about blog authorship
- Preferred method of setting user role only works on Main Site in Network
- Register existing user on another site in a multisite network?
- Subsite access without being a member of the subsite in wp multisite network
- single sign on for wordpress multi site
- Multi-Site Subfolder User Permission Issue
- I want to create a 300 multi-site wordpress network using subdomains
- Network of multisites in WordPress, create new site with all the contents of the main
- Cannot select signup_meta upon multisite user activation
- how to create wordpress network with multiple wordpress installations
- WordPress multisite, allow non super admins to create sites
- User registration is currently not allowed
- How to clone homepage for multi region site?
- Easily adding multiple existing users to a multisite site
- Allowing users to manually add or remove themselves to/from WordPress multisite blogs
- WordPress API – sign-up to multiple Multisites from one single form
- How to automate adduser (on linux) when add new user site in multisite
- Activation of new Registered site fails on multisite
- How to force WP to create a users table in multisite configuration?
- How to give “author” user role appropriate capabilities to add PollDaddy polls? WordPress multisite
- Best way to convert two single WordPress sites into Multisite network with shared user base
- Advice on WP site structure using multisite
- Trying to create site-wide Active Directory sync with Multisite
- Site Redirecting to wp-signup.php
- Are nested subdomains possible with a subdomain multisite?
- Querying posts from multiple sites in a network?
- is_front_page() malfunction?
- How can I diagnose a slow WordPress admin?
- How to enable a site administrator to edit users in a WordPress network/ multisite setup?
- BLOG_ID_CURRENT_SITE vs. SITE_ID_CURRENT_SITE in WordPress Multisite?
- Shared table across network
- Opinions whether to go multisite VS 3 separate WP installation [closed]
- Multisite: differences between subdomain and subdirectory mode? Can it be switch after installation?
- Ban SiteNames Multisite
- WP MultiSite API – Create new sites
- Multisite – how to remove the root ‘/’ site?
- WordPress multisite with domain mapping and virtual host on local with fake domain
- Don’t allow access to wp-admin but allow admin-ajax requests to be fulfilled on frontend?
- Timeout While Upgrading Network in Multi-site
- Full Domain Mapping with WP3 in Multiuser Mode
- How to combine multiple sites to WordPress MU
- Installing multisite network admin on sub-domain
- multisite custom directory
- Changing wp-content to other name? Multisite set up
- Rest API Multisite Site List?
- Query users by capability – uninstall/deactivate callback
- Auto creation of multisite blog on user registration
- Memory question on WordPress Multisite
- WordPress multisite on IIS – can’t open subpages
- Issues with Multisite installation and 403 error for REST API request
- How to run react app and headless WordPress and React App on same server (managed by plesk)?
- Multisite – Parent site with Polylang with different domains for each language [closed]
- How to disable wordpress cron jobs for a subsite?
- How to use HyperDB plugin in a existing wpmu
- Sort by site/blog column in Multisite
- Possibility of Create Site Specific CSS in a Multisite
- Get post by term from custom taxonomy in another blog on the network?
- Multi Network plugin: “Network not created” [closed]
- Https and Http Login Issue on WordPress Multisite
- Multisite network admin – User’s role not showing up
- Is it possible to install WordPress MU on a subdomain?
- WordPress multisite with same content
- Multisite and Multidomains WordPress
- Remember language choice on multisite website
- wp-cli core install –skip-email and –skip-config flags not working on MAMP unknown parameter
- Multisite network subdomains doesn’t work
- MULTISITE: Password issue and Error Cant access site
- trying to install a wordpress multisite in a subfolder and have custom subsite urls
- Accessing WP multisite via IP instead of domain
- Running hosted multisite version of wordpress
- How to implement this subdirectory mapping in multisite?
- WordPress MU with subdomain
- How do i get custom metabox data from each multisite blog?
- Multisite login and redirect to users main blog,
- Parse shortcodes from another site in WP Multisite
- Custom pages on all multisite network, to NOT show in wp-admin at all
- Install WordPress MU outside htdocs
- WordPress Multisite platform for different city for single db
- Not being allowed to use some terms in Add New Site in WordPress
- How to redirect root blog to a specific one in multilang WP?
- Single installation with sub-domains for admin and separate domains for sites
- Map WP Multisite blog.example.com to anotherdomain.com/blog?