Member registration form fails if uppercase letters used


Members registering for access to my site cannot sign up if they use uppercase letters in the username – they are just redirected to the previous screen after submitting the forms. Do you have a way to fix this please?


  • Ash
    • WordPress Hacker

    Hello @andor

    Welcome to WPMU community!

    I hope you are well today and thanks for asking the question.

    Is this a multisite? If yes, then it is blocked by WordPress. You can try the following code that converts the uppercase username to lowercase and make it compatible with multisite wordpress:

    function fixUsernameCase($username){
    $username = strtolower($username);
    return true;
    add_filter ( 'authenticate', 'fixUsernameCase', 10, 1 );

    You can add those codes in your functions.php in the theme, if you think your theme won’t be changed. Otherwise mu-plugins is the best solution. To use mu-plugins, go to /wp-content/ and find the folder with name ‘mu-plugins’. If there is no folder in that name, then create a folder, name it ‘mu-plugins’, create a file inside that, give any name you like and paste the code in there. You don’t need to activate that plugin. Mu-plugins means must use plugins, so it will be activated automatically always. If you use mu-plugins then add a php start tag at the beginning of the code.

    Please let us know if that fits your needs.



Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.