Make WordPress Core

Opened 14 years ago

Closed 14 years ago

Last modified 9 years ago

#17239 closed defect (bug) (fixed)

create username with dots

Reported by: lbf1's profile lbf1 Owned by: ryan's profile ryan
Milestone: 3.2 Priority: normal
Severity: trivial Version: 3.1
Component: Users Keywords:
Focuses: 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)

17239.diff (1.9 KB) - added by sorich87 14 years ago.
Use wpmu_validate_user_signup() in network/user-new.php

Download all attachments as: .zip

Change History (8)

#1 @scribu
14 years ago

  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to 3.2

#2 @ocean90
14 years ago

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.

#3 @technosailor
14 years ago

So which way do we want to standardize? Allowing dots or not?

#4 follow-up: @ryan
14 years ago

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.

@sorich87
14 years ago

Use wpmu_validate_user_signup() in network/user-new.php

#5 @sorich87
14 years ago

  • Keywords has-patch added; needs-patch removed

#6 @ryan
14 years ago

  • Owner set to ryan
  • Resolution set to fixed
  • Status changed from new to closed

In [18131]:

Make user validation when adding a user via network admin consistent with adding a user elsewhere. Provide better feedback for validation problems. Props sorich87. fixes #17239

#7 in reply to: ↑ 4 @ericlewis
9 years ago

  • Keywords has-patch removed

Replying to ryan:

In a later release we can drop the dot stripping.

I've opened #36286 for this

Note: See TracTickets for help on using tickets.