apply_filters( ‘can_add_user_to_blog’, true|WP_Error $retval, int $user_id, string $role, int $blog_id )

In this article

Filters whether a user should be added to a site.

Parameters

$retvaltrue|WP_Error
True if the user should be added to the site, error object otherwise.
$user_idint
User ID.
$rolestring
User role.
$blog_idint
Site ID.

Source

$can_add_user = apply_filters( 'can_add_user_to_blog', true, $user_id, $role, $blog_id );

Changelog

VersionDescription
4.9.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.