• Andreas

    (@andreaskarsten)


    Hiya, I am running WordPress 3.2 in Network Mode with BuddyPress 1.2.9 and just noticed that usernames with dots don’t work anymore. Trying to create a new user in the network admin panel with firstname.surname (like all our other users) leads to:

    “Only lowercase letters (a-z) and numbers are allowed.”

    The old trick from https://buddypress.trac.www.ads-software.com/ticket/1135 to insert

    define( ‘BP_ENABLE_USERNAME_COMPATIBILITY_MODE’, true );

    in wp-config.php or bp-custom.php does not work any longer.

    Any ideas why that is and how this can be changed?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter Andreas

    (@andreaskarsten)

    Found it. As per the discussion here:

    https://core.trac.www.ads-software.com/ticket/17239

    dots in usernames are not allowed. I have changed that now by modifying the function wpmu_validate_user_signup in /wp-includes/ms-functions.php in line 524 from

    preg_match( ‘/[a-z0-9]+/’, $user_name, $maybe );

    to

    preg_match( ‘/[a-z0-9.]+/’, $user_name, $maybe );

    I don’t like having to modify a core file, but I like even less that in ticket #17239 it was just decided to disallow dots in usernames. For network sites, which often are associated with username databases, which in turn are often associated with firstname.surname server accounts and email addresses, the dot is an importanrt feature!

    Total agreement with you on this one. I’m new to buddypress and am having the same issue, I thought it was a buddypress issue but seems from your fix its a wordpress problem.

    Something like that should be made into a general option or something not just decided globally like that.

    Question I have, can these adjustments be made with a hook of some sort rather than making the adjustment in the core file like that?

    Thread Starter Andreas

    (@andreaskarsten)

    I wouldn’t know how to do that – the official API filters don’t offer a hook that’s useful for this as far as I can see: https://codex.www.ads-software.com/Plugin_API/Filter_Reference

    Andreas,

    I’m running in to similar issues and the fix you mentioned doesn’t seem to work. I’m also a N00B to BP – I want to allow underscores ‘_’ in the username…any ideas? I just get the same dumb line:

    Only lowercase letters and numbers allowed

    Any advice you have to offer would be GREATLY appreciated!

    Thread Starter Andreas

    (@andreaskarsten)

    Hi piccollopete,

    Try using:

    preg_match( ‘/[a-z0-9._]+/’, $user_name, $maybe );

    that should work!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Usernames with dots not working’ is closed to new replies.