• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.2 No commas in user name

#1
No commas allow in user names,

This really is a big negative for me to deal with. I have a lot of users that use commas to separate their name from their profession titles James Smith, MPF CPF GCF

Sure I can change it and I will get 100's of messages that they can do longer log on. Sure I'd sent an email but few understand what happening.

I have several other friend that run boards and waiting to see what I do before they jump in. All want commas in names.

I'm sure this is a big programming problem but it really needs to be done IMHO.

Thanks for your hard work,
framer
 
Last edited:
#3
You may not have a comma in the user name when you register and the commas must be removed from a users name when importing a data base from another board.

framer
 

Mike

XenForo developer
Staff member
#4
This will simply not change. Commas are used as user delimiters in a number of situations. It has not proved to be a significant issue in general, though I appreciate that each situation is different.
 
#5
Sorry to hear that. I would have never purchased a license had I picked up on this. I will put this on the back burner and discuss this more with other before I proceed any further.

framer
 

ENF

Well-known member
#6
Sorry to hear that. I would have never purchased a license had I picked up on this. I will put this on the back burner and discuss this more with other before I proceed any further.

framer
FWIW, I'm a member of a professional forum and they use the user title field to specify professional designations or affiliations. This worked out to be much cleaner than people trying to add into their username. If someone wanted to add/delete a designation, they would just change the user title. People also build professional signatures, with their contact info & designations as well.

There a few ways to go about it, but from a technical perspective, commas in user names is a bad bad bad idea if you ever want to export that user list or database for other users.

Good luck.
 

Chris D

XenForo developer
Staff member
#7
There is a very hacky way to get around this.

It still relies on you removing the comma from all usernames, affecting how they are displayed throughout the site, but it would allow your users to keep logging in with their existing username that contain commas.

It would at least ease the transition.

In terms of logging in, it involves a single line of custom PHP code that strips commas out of usernames entered into the login form.

That would allow James Smith to login with his existing username:
James Smith, MPF CPF GCF

But before the login is validated, you would remove the comma, resulting in the following being what is validated during the login process.
James Smith MPF CPF GCF

A similar process could be followed for new registrations, potentially.
 
#9
I wasn't aware of this limitation, and it might be a deal breaker for me as well. Forums that have members with professional designations in the user's legal names will be restricted, and I also have a different forum with the same situation. I am currently on VB 4.2 but was planning to make the switch in 2014 to Xenforo. This is a problem, unfortunately, since it isnt a new install.

Mike: This will simply not change. Commas are used as user delimiters in a number of situations. It has not proved to be a significant issue in general, though I appreciate that each situation is different.
I notice the LOCATION field allows a comma. Example: Boston, MA Would this negate the concern about comma delimited fields?

Hopefully this is something that can be reconsidered or improved in the future? If so, i'm sold!

Thanks
Rhody
 
Last edited:

RobParker

Well-known member
#10
I notice the LOCATION field allows a comma. Example: Boston, MA Would this negate the concern about comma delimited fields?
It's specifically the username where commas are often used as delimiters to list multiple users (e.g. when addressing a PM). The fact that they're allowed in other custom fields is irrelevant.
 

AndyB

Well-known member
#11
In terms of logging in, it involves a single line of custom PHP code that strips commas out of usernames entered into the login form.

That would allow James Smith to login with his existing username:
James Smith, MPF CPF GCF

But before the login is validated, you would remove the comma, resulting in the following being what is validated during the login process.
James Smith MPF CPF GCF
This is n excellent solution, Chris.

The one line of code would allow those users who have a comma in their username to log in. The admin can communicate with the member about changing the username to one that does not use a comma and once all active members are converted the code can be removed.
 

Chris D

XenForo developer
Staff member
#12
Well, the usernames would need commas removed for the import to work.

But what it means is when people try to log in with a comma in their name, the login will be successful.