Create or add a user to a blog programmatically?
-
What is the correct sequence of function calls to send a user (existing or new) an invitation to join a particular site (in multisite)?
Looking at wp-admin/user-new.php, it looks like:
global $blog_id; wpmu_signup_user($username, $email, array('add_to_blog' => $blog_id, 'new_role' => $role ));
This indeed generates and sends a generic email of this form:
`To activate your user, please click the following link:
https://myblog/wp-activate.php?key=440e0cd3883956e9
After you activate, you will receive *another email* with your login.`but clicking the link does not add the user to the given blog, and a second email never arrives. Is there another way that’s more appropriate?
I’m trying to do this in order to create a “bulk add” operation for many users at once. (I already looked at the Secure Invites plugin but it does more than I need.)
Thank you very much.
- The topic ‘Create or add a user to a blog programmatically?’ is closed to new replies.