We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

register in arabic letter | Forum

Anas mansour
Anas mansour Aug 7 '14
hi
can you tell me why oxwall doesnt allow to register in arabic letter ??
and how to solve this problem ??
Alia Team
Alia Aug 11 '14
Anas, username validation is defined  in ow_utilities/validator.php file:

    const USER_NAME_PATTERN = '/^[\w]{1,32}$/';

\w part  - regular expression responsible for allowing only Latin letters.

To solve the problem you will need to modify the '/^[\w]{1,32}$/' expression to fit your needs.

I recommend googling this. Ex: https://www.google.com//?gws_rd=ssl


Anas mansour
Anas mansour Aug 13 '14
thanks for your reply allia
i found this
"

EDIT: For arabic letters: First declare a string containing all arabic letters so you'll have

$arabic='all_arabic_letters';

Then your regexp string will be

$regex='['.$arabic .']{1,}([a-zA-Z0-9]{1,})\s{0,3}_{0,4}';

And match it as follows:

preg_match($regex,$username);

"


but i dont know how to
declare a string containing all arabic letters and where ??!!
Anas mansour
Anas mansour Aug 16 '14
help please ??
Anas mansour
Anas mansour Aug 25 '14
please if anyone can help me
i dont think it is impossible because most of sites allow to register in arabic  letters
The Forum post is edited by Anas mansour Aug 25 '14
Erlan
Erlan Feb 25 '15
This is for storing, how about the formula that displays the profile name in the wall and on the right side on the floating box ? I dont want to change the rules for registering usernames, i want to concadinate a special character when displaying, i just need to know which file is it and where it is
The Forum post is edited by Erlan Feb 25 '15