The MU forums have moved to WordPress.org

Why the Username Characters Restrictions? (3 posts)

  1. seanwedig
    Member
    Posted 16 years ago #

    I've recently started tinkering with WPMU to determine if it will work well for our academic institution's blogging needs. We're tying it to an existing LDAP installation (using a mashup of the LDAP plugin for WPMU and custom code), but I've run into a small snag.

    Our LDAP user names are all of the form "name_#", where name is the last name, and number is a unique number. These are, unfortunately, not a valid user names for WPMU, though, because it has non-alphanumberic characters, as well as failing an explicit check for underscores in names.

    Underscores in names are valid according to traditional WP, so I must ask - why the explicit denial for underscores? Does anyone know why WPMU has such restrictive user name requirements? I want to do this the "right" way, and not break other functionality or security, if I can.

    As for customizing it for our needs, I know I can easily just hack the WPMU core function to change the regex and remove the underscore check, but the explicit check for underscores raised warning flags in my mind - if someone went to the effort of double-restricting underscores (once in the regex, another explicitly), there's probably a good reason to disallow them.

    -sean

    PS I would love to avoid core hacks if I could - the more "standardized" we can keep our installation, the easier it will be to maintain later on down the road. However, I realize that in this case, there's probably not a pluggable way to do this yet, but if anyone knows of a way... :)

  2. drmike
    Member
    Posted 16 years ago #

    I agree with the underlines. Not sure why they're excluded. You may want to open up a trac ticket and see if Donncha could take a look at the issue.

  3. seanwedig
    Member
    Posted 16 years ago #

    Ah - good point, drmike. Thanks.

    It's been entered as ticket #336 (http://trac.mu.wordpress.org/ticket/336).

    -sean

About this Topic

  • Started 16 years ago by seanwedig
  • Latest reply from seanwedig