Closed xLink closed 7 years ago
When you say the full keyboard range of characters, do you mean A-Za-z0-9(+special chars) or do you mean unicode/cyrillic/etc too?
prolly just what en_us/en_gb keyboards can input as "full keyboard range" ...didnt even think about the Cyrillic etc stuff
Emoji?
lol no emojis in usernames @JohnMaguire xD
0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-
for usernames probably just go with that (maybe not even _ - tbh), could even force lowercase or allow case sensitivity but validate against it all lowercase so you don't have the same username (xLink vs xlink vs XLINK for example)
lol no emojis in usernames @JohnMaguire xD
Pfft, well I guess I forgot that the UK isn't a free country! 😆
💩⛈ < if you're allowing emoji there's my username
Try ctype_alnum(str_replace(['-', '_'], '', $username)); // bool
0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-
tis what @richard-clifford suggested on irc too
[a-zA-Z0-9_-]
it is :D
💩👍
We need to figure out if we want to allow the full keyboard(?) range of characters as usernames or should we make sure they conform to some kind of validation ?
This is mostly coming up because I am currently adding @ mentions to the Forum BUT this validation concerns the auth module so ..