Opened 2 years ago
Closed 2 years ago
#17239 closed defect (bug) (fixed)
create username with dots
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | 3.2 |
| Component: | Users | Version: | 3.1 |
| Severity: | trivial | Keywords: | has-patch |
| Cc: |
Description
at 'Users > Add New' its not possible to create users with '.' in the name, but in Network Admin > Users > Add New its possible...
(normal) wp-includes/ms-functions.php
function wpmu_validate_user_signup($user_name, $user_email) {
...
preg_match( '/[a-z0-9]+/', $user_name, $maybe );
...
}
Only lowercase letters (a-z) and numbers are allowed.
(network) wp-admin/network/user-new.php
dont have any regexp...
Attachments (1)
Change History (7)
- Keywords needs-patch added
- Milestone changed from Awaiting Review to 3.2
comment:3
technosailor — 2 years ago
So which way do we want to standardize? Allowing dots or not?
Not allowing dots is a holdover from when the user name and domain were one and the same. That said, for now let's make network/user-new.php use wpmu_validate_user_signup(). In a later release we can drop the dot stripping.
Note: See
TracTickets for help on using
tickets.

Non-Multisite uses only sanitize_user with $strict = true and Multisite first uses wpmu_validate_user_signup.
I think dots aren't allowed because it's used for the site domain name too.