[wp-trac] [WordPress Trac] #20459: Super admin should be able to bypass banned/limited domains when creating users
WordPress Trac
wp-trac at lists.automattic.com
Mon Apr 16 16:12:25 UTC 2012
#20459: Super admin should be able to bypass banned/limited domains when creating
users
---------------------------+-----------------------------
Reporter: boonebgorges | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Network Admin | Version:
Severity: minor | Keywords: has-patch
---------------------------+-----------------------------
The function `wpmu_validate_user_signup()` is run whenever a new user is
created, either through self-registration (wp-signup.php) or through
manual user creation by an admin. `wpmu_validate_user_signup()` does two
different kinds of validation:
(1) validation that is more or less technically required by WP, like
spaces in usernames, email/login uniqueness, etc.
(2) checks against some admin-set membership restrictions, namely, email
domain whitelist (limited_email_domains) and blacklist
(`is_email_address_unsafe()` and banned_email_domains).
The second kind of validation is problematic in the following use case: An
MS install might restrict open membership based on email domains, but the
admin might occasionally want to make exceptions to the rule and manually
create an account. Currently, there are two ways to bypass the built-in
checks: to temporarily remove the domain restrictions at Network Admin >
Settings, or to filter `'wpmu_validate_user_signup'` and remove the error
messages.
Having to manually change settings for this purpose is pretty hackish. The
filter method works, but my experience (from consulting with a fairly
large number of MS network admins) is that this is a pretty common use
case, so it seems like it should be supported by default.
So I'm proposing that the domain checks be skipped when
`is_super_admin()`. Patch attached.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/20459>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list