If you want to force add a MU user and activate them, and email them, this will do it. It’s a slightly altered version of a piece of the code in user-new.php.
wpmu_signup_user( $new_user_login, $new_user_email, array( 'add_to_blog' => $blogid, 'new_role' => $role ) );
$key = $wpdb->get_var( $wpdb->prepare( "SELECT activation_key FROM {$wpdb->signups} WHERE user_login = %s AND user_email = %s", $new_user_login, $new_user_email ) );
$ret = wpmu_activate_signup( $key );
The wpmu_activate_signup function will send the welcome email. And the $ret from wpmu_activate_signup is an array of several things, including the user_id in $ret[‘user_id’].
Obviously you’ll need to fill in the user name, email, blogid, and role in the above code.
Related Posts:
- Allow user to select a theme to install when they signup
- Password Reset for Users on a Multisite Subsite
- Overriding the default WP Multisite notification e-mail
- How to reset passwords for all users on a network using wp cli
- Stop wordpress from sending out moderation emails
- Emailing only the users of a MultiSites Sub-Sites
- How to make wp-signup.php a 1-step process [closed]
- Stuck with WordPress Multisite Custom signup page without .htaccess modification
- Password protect a single site on network
- Howto disable comment moderation emails for admins, but not for authors
- Multisite not using subdomains as hostname in from address when sending emails
- wp_mail() not sending email in multisite subdomain
- How can I add custom meta on signup page and pass along to be used after blog activation?
- Google Apps SMTP for WP MultiSite?
- How to show different sub sites based on Member’s user name In word press?
- How can I manually activate a new site in a wordpress multisite network?
- How to change a user role after registering in multisite?
- Activation Account Email
- Set my own password when registering a multisite user or site
- Multisite – SMTP not working on other network sites
- How to auto create site after user sign up on multisite(network)
- Sending SMTP mail using a server with self-signed SSL
- Multisite “Skip Confirmation Email” Log Out Problem
- How does adding custom meta to signup form work?
- Create service similar to wordpress.com [closed]
- How to use WordPress Multisite With Different Domain Names?
- How To Add Custom Form Fields To The User Profile Page?
- Where are available Roles Defined in the wp_ database?
- restore_current_blog() vs switch_to_blog()
- Can i merge 2 new WP_Query($variable) ‘s?
- How to disable a network enabled plugin for just one site?
- How to reliably flush rewrite rules on multisite?
- Site Redirecting to wp-signup.php
- Moving a WP Multisite to a subdirectory
- Cookies in multisite where network sites have their own domain name
- Convert a Multisite WordPress install into a Single site
- WordPress MultiSite Active Directory integration and site privacy
- WordPress Job Interview Preparation
- How to add Custom Blog Options to new blog setup form?
- How can I trust switch_to_blog()?
- Remove the blog slug from WordPress Multisite root node
- Why are my roles not visible in a Multi-site/Network?
- Site admin in a network install can’t edit users?
- How to use same email for multiple users
- How to run an activation function when plugin is network activated on multisite?
- Specific upload folder for PDFs in custom Post type in WP multisite
- Disable user registration password email
- What is the correct way to map multiple domains in a WordPress 4.1 multisite install?
- Where can I find documentation on what characters are allowed in user names and why?
- How to migrate subsite from dev multisite to production multisite
- How can I un-reserve a pending username registration?
- How do I remove/delete an old super admin user?
- DB connection error after copying a WordPress Multisite instance to a second location
- Redirect Main Site to Subsite in Multisite WordPress
- Is there a is_user_logged_in() for multisite?
- Switching MultiSite installation from HTTP to HTTPS
- Setting up a wordpress network with third level domains
- Get upload URL by blog ID in multisite
- What’s the difference between get_site_option and get_blog_option?
- Need help sorting “My Sites” Alphabetically
- How to delete post revisions?
- Create mobile site with same content just different theme
- Add additional Network constants to wp-config.php dynamically
- Multisite stuck at 1MB for max file size
- How to get blog name, when using WordPress Multisite
- What are options are there to implement a multi language site
- Missing URL in password reset email
- Switching primary site in WordPress Multisite
- Multisite Network Port Num Issues?
- Convert existing site to network
- Where is the robots.txt stored for a WordPress Multisite install?
- Settings API in Multisite – Missing update message
- Add WordPress MU Network Admin via Database
- How to get current site id? (WPMU)
- Multisite on Windows with wildcard subdomains
- Why is WordPress Multisite redirecting to wp-signup.php and how to fix it?
- Which asset URLs are acceptable in a “vanilla” MU install?
- $wpdb->base_prefix not get parent site prefix in multisite
- How to tell which database tables belongs to which multisite site
- what are pmxi tables? [closed]
- Using wp_insert_post() with Networking enabled
- Are nested subdomains possible with a subdomain multisite?
- Sharing Dynamic Sidebars across Multisite Blogs
- I want to develop locally with Multisite, then migrate each site to separate remote WP installs
- Anyone figured out how to use WordPress MultiSite with Domain Mapping & SSL?
- Can a multisite’s blogs be accessible from two different sub-domains?
- Querying posts from multiple sites in a network?
- Plugin for editing options on multisite?
- What do I need to do to convert my MultiSite from HTTP to HTTPS?
- is_front_page() malfunction?
- WP Multisite development with Mamp Pro and wildcard subdomains, not really working for me
- How to share WordPress core library
- How do I change the Multisite URL?
- Create site programmatically for WPMU
- Can upload doc and pdf but not ppt – not permitted for security reasons
- How Can I Centralize Content Usage and Approval in a WordPress Multi-Site installation
- WordPress Multisite: Adding actions to only one site
- WordPress Multisite allow site admin to add user without email confirmation
- Domain mapping (without plugin) in 4.5.x multisite?
- wordpress multisite, how to keep user on subdomain throughout registration process?