• Resolved Natalia

    (@nataliacg)


    Hi! Please, I would like my users to be able to register with names that contain spaces between the words. Now the plugin does not allow it. How could I do it?

    Thank you!

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support Ultimate Member Support

    (@ultimatemembersupport)

    Hi @nataliacg,

    Are you referring to the WordPress username or Ultimate member First name?
    WordPress doesn’t allow to use spaces in username.
    Ultimate member First and Last name can contain spaces.

    Regards.

    Thread Starter Natalia

    (@nataliacg)

    I´m traying to register Juan Perez and it doesn’t allow me, but allows me to put Juan_Perez. The plugin does not allow writing Juan Perez?

    Thank you!

    Thread Starter Natalia

    (@nataliacg)

    (And I´m using UM register, thanks)

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @nataliacg

    You need to add this custom code in your theme’s function.php to allow spaces in the username:

    add_filter("um_validation_safe_username_regex", "um_custom_validation_safe_username_regex", 10, 1);
    function um_custom_validation_safe_username_regex( $reg ){ 
    
        return '/^[a-zA-Z0-9 \s]+$/';
    
    }

    Regards,

    Thread Starter Natalia

    (@nataliacg)

    It works, thank you! 😀 Another question, it is possible to add something so that they can register with accents in the names?

    Example: Juan Pérez, Elena Sánchez, Tomás Martínez

    Thanks again!

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @nataliacg

    It should work with the latest version.

    Regards,

    Thread Starter Natalia

    (@nataliacg)

    Thank you very much, I will try it!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘User names register’ is closed to new replies.