Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Use non-Engish characters in username field. Is it possible?
hi,
Can i change the system so it accepts letters in username field other than English? At the moment if I enter username in non-English characters it gives me a standard error message: "User name can only contain letters, numbers, underscores etc".....and does not allow to register.
I have database set up in UTF8-unicode.
thank you.
Can i change the system so it accepts letters in username field other than English? At the moment if I enter username in non-English characters it gives me a standard error message: "User name can only contain letters, numbers, underscores etc".....and does not allow to register.
I have database set up in UTF8-unicode.
thank you.
Tagged:
0
Answers
Vanilla Forums COO [GitHub, Twitter, About.me]
See this thread for 2.0.17 or before.
@Tim
By any chance do you move the regular expression into the locale file instead of config file?
Because;
1. In many cases, the request like this comes from the user who uses non-English locale. So, if locale file can include the regex pattern for ValidateUsername() function, many users will be satisfied by enabling locale pack without editing conf.
2. If we change the regex pattern for validate username, we may also want to change some translation code like this. It's better to change just 1 file than 2 files.
and,
3. I think the regex patterns should be together in one place for ValidateUsername(), Mentions() (for @mentions and for #hashtag) and GetMentions(). All of changes for them have just one purpose. To re-define valid characters for their locale.
Back to the discussion and search "
// Handle @mentions
".Also you'd better to check the discussion [Simplified Chinese Locale Addon] 中文用户名解决方案.
The first discussion and the handle mentions part you mention covers only the 'space' issue, not the 'non-Engish characters' issue.
I found the answer in the Chinese discussion you mention. Though, I don't understand a single word of it, the expression
'/(^|[\s,\.])@([\S]{1,20})(?=[\s,\.!?]|$)/i',
solves my problem for the time being.These solutions are all workarounds, though.
In my opinion, when mentioning, a colon (:) should be put to the end of the mentioned username and then the part between @ and : (colon) could be taken, something like "@hello, this is me: I can see that is you".
A user should be allowed to take a username whatever he/she wants, restrict the user right at the very beginning when trying to register at your forum is the worst you can do. Later on, they will come to their own decision anyway to change it when they find they are unable to connect to facebook, twitter, etc...
i'm currently trying to enable chinese username support and hope we can resolve this shortly. i really like vanilla forums and see a lot of potential in it, but support for non-english characters in usernames is a must for us. thanks!