WordPress at Your Fingertips
filter is not described

can_add_user_to_blog filter-hook . WP 4.9.0

Filters whether a user should be added to a site.


add_filter( 'can_add_user_to_blog', 'filter_function_name_6280', 10, 4 );
function filter_function_name_6280( $retval, $user_id, $role, $blog_id ){
	// filter...

	return $retval;
True if the user should be added to the site, error object otherwise.
User ID.
User role.
Site ID.

Where the hook is called

wp-includes/ms-functions.php 188
$can_add_user = apply_filters( 'can_add_user_to_blog', true, $user_id, $role, $blog_id );

Where in WP core the hook is used WordPress

Usage not found.