Make WordPress Core

Opened 11 years ago

Closed 10 years ago

#20176 closed enhancement (wontfix)

Allowing the Developer Filter the Regex on wpmu_validate_user_signup()

Reported by: webord's profile webord Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.4
Component: Multisite Keywords:
Focuses: Cc:


So I've been having a problem with the way WordPress Multisite handles the restriction for new users.

Looking at the file ms-functions.php, I saw no Filter to the regular expression applied on the user_name to do it's validation.

I've changed like this, so by default you will be restricted to the [a-z0-9] pattern, but if needed the developer should have the power to filter that.

This might need a patch for the domains.

Attachments (2)

ms-functions.diff (626 bytes) - added by webord 11 years ago.
Changes to the wpmu_validate_user_signup
ms-functions.2.diff (815 bytes) - added by webord 11 years ago.
With the Filter for the error message

Download all attachments as: .zip

Change History (7)

11 years ago

Changes to the wpmu_validate_user_signup

#1 @scribu
11 years ago

Related: #20019

11 years ago

With the Filter for the error message

#2 @webord
11 years ago

So I added a filter for the message the message may change to match the regex.

#3 @webord
11 years ago

Question, this patch is going to be applied? I would love to see this feature in the core.

#4 @webord
11 years ago

  • Cc… added

#5 @jeremyfelt
10 years ago

  • Keywords dev-feedback removed
  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed

The filter wpmu_validate_user_signup in wpmu_validate_user_signup() provides the complete result of the original validation, including the submitted username and any errors generated. This filter can be used to unset any errors and perform custom logic on the existing result.

Note: See TracTickets for help on using tickets.