On this page
apply_filters( 'can_add_user_to_blog', true|WP_Error $retval, int $user_id, string $role, int $blog_id )
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
File: wp-includes/ms-functions.php. View all references
$can_add_user = apply_filters( 'can_add_user_to_blog', true, $user_id, $role, $blog_id );
Related
Used By
| Used By | Description |
|---|---|
| add_user_to_blog() wp-includes/ms-functions.php | Adds a user to a blog, along with specifying the user’s role. |
Changelog
| Version | Description |
|---|---|
| 4.9.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/can_add_user_to_blog