add_user_to_blog WordPress Action Hook
The add_user_to_blog WordPress hook allows a user to be added to a blog as an author, contributor, or subscriber. This hook is useful for creating a multi-author blog or for adding users to a blog as part of a content-sharing agreement.
do_action( 'add_user_to_blog', int $user_id , string $role , int $blog_id ) #
Fires immediately after a user is added to a site.
Parameters
- $user_id
(int)User ID.
- $role
(string)User role.
- $blog_id
(int)Blog ID.
Source
Changelog
Version | Description |
---|---|
MU (3.0.0) | Introduced. |