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

XF 1.1 Start Conversation With User With Comma In Username

Discussion in 'Troubleshooting and Problems' started by digitalpoint, Jun 28, 2013.

  1. digitalpoint

    digitalpoint Well-Known Member

    Basically as the title says... Is there a way to start a conversation with a user if they have a comma in their username?
     
  2. Liam W

    Liam W Well-Known Member

    I don't believe it is, but you can't have a username with a comma. Even if you try it from the AdminCP you get an error...
     
  3. Chris D

    Chris D XenForo Developer Staff Member

    digitalpoint may very well have a user with a comma as he was on vBulletin forever.

    The only solutions here as far as I can see are:

    Change the delimiting character used in the explode function in the controller.

    Change the username.

    Do something with jQuery so that the selected user IDs are passed to a hidden input and modify the controller to get the users from that rather than the usernames.

    Maybe store a cache of usernames with commas in and handle these as a special case in the function before they're exploded to an array in the controller.
     
    Liam W likes this.
  4. Liam W

    Liam W Well-Known Member

    Didn't think of that.

    If it were me, I would opt for the first option (it seems like the quickest option).
     
  5. Mike

    Mike XenForo Developer Staff Member

    Commas aren't actually allowed in names in XF (nor are names that could be emails). Probably an edge case in your conversion script (as the default one will force you to change their names).
     
    digitalpoint, Luke F and Liam W like this.
  6. digitalpoint

    digitalpoint Well-Known Member

    Ah, okay... Will just change their username... Problem solved. :)
     
    RoldanLT likes this.

Share This Page