1. 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

Discussion in 'XenForo Questions and Support' started by framer, Dec 8, 2013.

  1. framer

    framer Member

    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: Dec 8, 2013
  2. Jeremy

    Jeremy XenForo Moderator Staff Member

    I'm not sure I understand what the dilemma is. Are you unable to use commas to register?
     
  3. framer

    framer Member

    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
     
  4. Mike

    Mike XenForo Developer Staff Member

    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. framer

    framer Member

    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
     
  6. ENF

    ENF Well-Known Member

    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.
     
    Tracy Perry likes this.
  7. Chris D

    Chris D XenForo Developer Staff Member

    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.
     
    AndyB likes this.
  8. Tracy Perry

    Tracy Perry Well-Known Member

    I could see more use from using usergroups and banners than allowing them to use it in their name personally.
     
  9. Rhody

    Rhody Member

    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.

    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: Dec 9, 2013
  10. RobParker

    RobParker Well-Known Member

    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.
     
  11. AndyB

    AndyB Well-Known Member

    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.
     
  12. Chris D

    Chris D XenForo Developer Staff Member

    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.
     
    AndyB likes this.

Share This Page