There is a new feature for limiting usernames in vb 4 (I think it has been added recently) called: Username Regular Expression
I had problem with adding some Persian (UTF-8) characters to this new feature to let users have some non-English usernames.
The regex I used is here:
The vb code will not accept the above code by default so I solved the problem by adding a "u" to the end of line 454 of class_dm_user.php
changed it from:
to this:
So in this way the regex pattern will accept unicode characters.
Please somebody let me know if there is another solution to solve this without touching the vb code or please correct this in future versions.
Regards,
I had problem with adding some Persian (UTF-8) characters to this new feature to let users have some non-English usernames.
The regex I used is here:
Code:
^[A-Za-z\s\x{0600}-\x{06FF}0-9_\.\- ]+$
changed it from:
PHP Code:
if (!preg_match('#' . str_replace('#', '\#', $this->registry->options['usernameregex']) . '#siU', $username))
PHP Code:
if (!preg_match('#' . str_replace('#', '\#', $this->registry->options['usernameregex']) . '#siUu', $username))
Please somebody let me know if there is another solution to solve this without touching the vb code or please correct this in future versions.
Regards,
Comment