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.


Top ↑

Source

File: wp-includes/ms-functions.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
MU (3.0.0)Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More
Show More