wpseek.com
A WordPress-centric search engine for devs and theme authors



can_add_user_to_blog › WordPress Filter Hooks

Since4.9.0
Deprecatedn/a
apply_filters( 'can_add_user_to_blog', true, $user_id, $role, $blog_id )
Parameters: (4)
  • (true|WP_Error) $retval True if the user should be added to the site, error object otherwise.
    Required: Yes
  • (int) $user_id User ID.
    Required: Yes
  • (string) $role User role.
    Required: Yes
  • (int) $blog_id Site ID.
    Required: Yes
Defined at:
Codex:

Filters whether a user should be added to a site.





Source

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