I have a custom post type created for new users when they are added to a multisite environment using the wpmu_new_user hook, but I noticed that it was only fired on new user creation and not when an existing user is added to a site. Is there a hook that gets fired when both new or existing users are added to a site?
There's one called
added_existing_user that fires immediately after adding an existing user.
Digging a little deeper, I find the function
add_user_to_blog() is used by both
add_existing_user_to_blog(), and has an action hook named
add_user_to_blog. I'd look into using that last hook, if I wanted to ensure something happened when a user was added to a site, whether they were