[wp-trac] [WordPress Trac] #41101: Add filter to prevent the addition of a user to a blog
WordPress Trac
noreply at wordpress.org
Tue Jun 20 15:45:33 UTC 2017
#41101: Add filter to prevent the addition of a user to a blog
-------------------------+-----------------------------
Reporter: jmdodd | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Users | Version: trunk
Severity: normal | Keywords:
Focuses: multisite |
-------------------------+-----------------------------
In some multisite instances, we may want to establish a policy that only
certain users may be added to a given blog.
The current option available for preventing the addition of a user to a
given blog is hooking into the `add_user_to_blog` action and undoing the
user addition after it has already taken place. This is problematic
because the user has already been added to the blog and any related
actions may have already fired, depending on their priority.
This introduces a filter to allow a plugin to override the addition of a
user to a given blog. There is already precedent in `add_user_to_blog()`
for returning a WP_Error if the user does not exist.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/41101>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list