// If the user doesn't already belong to the blog, bail.
if(is_multisite() && ! is_user_member_of_blog($id)){ wp_die( '<h1>' . __( 'Something went wrong.' ) . '</h1>' . '<p>' . __( 'One of the selected users is not a member of this site.' ) . '</p>', 403 ); }
if($update){ /**
* Fires immediately after an existing user is updated.
*
* @since 2.0.0
* @since 5.8.0 The `$userdata` parameter was added.
*
* @param int $user_id User ID.
* @param WP_User $old_user_data Object containing user's data prior to update.
* @param array $userdata The raw array of data passed to wp_insert_user().
*/
/**
* Fires immediately after a user is added to a site.
*
* @since MU (3.0.0)
*
* @param int $user_id User ID.
* @param string $role User role.
* @param int $blog_id Blog ID.
*/ do_action( 'add_user_to_blog', $user_id, $role, $blog_id);
// If the user doesn't already belong to the blog, bail.
if( ! is_user_member_of_blog($user_id)){ wp_die( '<h1>' . __( 'Something went wrong.' ) . '</h1>' . '<p>' . __( 'One of the selected users is not a member of this site.' ) . '</p>', 403 ); }