Usernames not able to use special characters

steven downer Posted in General Discussion 5 months ago

Is there any real reason why USERNAMES cannot contain a (SPACE) or a (-) to separate a possible two name USER NAME?

Eg: Spider-Man or Spider_MAN instead of SPIDERMAN?
A number of users have asked if this can be changed.

Can this be changed easily or is there a practical reason to keep special characters out of usernames?

German Arsalan Shah Replied 5 months ago

I believe you should change language file that translate username to something else and i believe yes in computer world username and first name, last name is different but for normal user its really confusing , they thing why to enter twice.

Yet as we are not going to implement in core due to some reasons we restricted username to alphanumeric, (without spaces, dashes, dots) and not going to provide any way here to change it. It may will break your site later but if there is any programmer willing to do so and knows what will be side effects of doing it is welcome to post solution on other forum.

@Steven, you may contact us directly via contact form to find out what may can happen as i am not willing to disclosing it to public.

Tatar Steven downer Replied 5 months ago


Forgive my ignorance.

Although I am familiar with PHP on a basic level and NOT on the level of the developers here/Soft Labs, I am a fairly average HTML, and PHP user for various projects. I am not a PHP or HTML developer to any great level, however, I am familiar with the use of REGEX for the likes of usernames and passwords.

I am aware that a simple regex change can generate a USERNAME with white space and/or (_) characters.

As this is a somewhat repeating question from my users to generate, for example, (SPIDER MAN) as a user name, what are these "reasons"?

I ran a test for a simple Create User, Change Password and Edit Profile set of scripts, outside of OSSN, and it works fine with just an amendment to the preg_match() lines.

It is a trivial I know, but to a user of OSSN, it can be frustrating if

"The Man With No Name" user

has to both enter and have displayed his profile as


I appreciate the developers may have their reasons but given the simplicity of regex to do this then it is disappointing to hear .

German Arsalan Shah Replied 5 months ago

There are few reasons and is only allows alpha numeric usernames, i believe its not easy to modify it on component level.