Make WordPress Core

Opened 15 years ago

Closed 13 years ago

#20176 closed enhancement (wontfix)

Allowing the Developer Filter the Regex on wpmu_validate_user_signup()

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

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

Download all attachments as: .zip

Change History (7)

@webord
15 years ago

Changes to the wpmu_validate_user_signup

#1 @scribu
15 years ago

Related: #20019

@webord
15 years ago

With the Filter for the error message

#2 @webord
15 years ago

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

#3 @webord
15 years ago

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

#4 @webord
14 years ago

  • Cc webord.net@… added

#5 @jeremyfelt
13 years ago

  • Keywords dev-feedback removed
  • Milestone Awaiting Review
  • Resolution → wontfix
  • Status new → 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.