Loading...
 
Community and *.tiki.org site organization

Community and *.tiki.org site organization


Non-english characters in usernames

posts: 6 Denmark

Hi there.

I've setup a tikiwiki site for a friend. He now wants to create usernames with non-english characters.

Is that possible? How do I enable that feature?

/Karneevor

posts: 2

You can modify the $patterns'login' in ./tiki-setup_base.php and tiki-adminusers.php to your language's need. For example, I need my tikiwiki support Chines user name, I changed the value of $patterns'login' to

$patterns'login' = "/^[\x{4e00}-\x{9fa5}| a-z | 0-9 | A-Z|]+$/u";

which means that users can use all Chinese words, numbers, and English words as user name.

enjoy it!


posts: 2

here is the code:

Image
$patterns['login']   = "/^[\x{4e00}-\x{9fa5}| a-z | 0-9 | A-Z|]+$/u";//

posts: 56 China

Thank you very much, outcrop !

I met the same problem today, and your code worked smoothly ! biggrin

I think the Tikiwiki team should add this code to the Tiki Core!

However, it seems that you had refused underscore(_) and hyphen (-) from the username by your code. But in Tikiwiki v2.2, these symbols is allowed by default. Maybe you need to modify your code?

Thanks.