WordPress.org

Make WordPress Core

Opened 10 years ago

Closed 8 years ago

#20176 closed enhancement (wontfix)

Allowing the Developer Filter the Regex on wpmu_validate_user_signup()

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

Description

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 10 years ago.
Changes to the wpmu_validate_user_signup
ms-functions.2.diff (815 bytes) - added by webord 10 years ago.
With the Filter for the error message

Download all attachments as: .zip

Change History (7)

@webord
10 years ago

Changes to the wpmu_validate_user_signup

#1 @scribu
10 years ago

Related: #20019

@webord
10 years ago

With the Filter for the error message

#2 @webord
10 years ago

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

#3 @webord
10 years ago

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

#4 @webord
9 years ago

  • Cc webord.net@… added

#5 @jeremyfelt
8 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.