add_user_to_blog


add_user_to_blog ( $blog_id, $user_id, $role )

Parameters:
  • (int) $blog_id ID of the blog you're adding the user to.
  • (int) $user_id ID of the user you're adding.
  • (string) $role The role you want the user to have
Returns:
  • (true|WP_Error)
Defined at:
Change Log:
  • M: U

Description

Adds a user to a blog.

Use the {@see 'add_user_to_blog'} action to fire an event when users are added to a blog.

Related Functions

add_new_user_to_blog, add_existing_user_to_blog, get_users_of_blog, add_user_meta, maybe_add_existing_user_to_blog

Top Google Results

User discussions

wpseek mobile