| tensh |
|
|---|---|
|
How to create a filter during registration, preventing user to create usernames with spaces or forbidden letters (like & or "')?
Отредактировано: tensh (06.12.2012 09:05, 12 лет назад)
|
| Kilandor |
|
|---|---|
|
You will need to create a plugin that hooks into users.register.add.validate and then you may check for any characters you don't want and then present an error |
| Macik |
|
|---|---|
|
It needs simple plugin creation with «hooked» on With several lines of actual code:
$L['aut_notallowedname'] = 'Only letters, digits, hyphen, underscore allowed for User name ';
if (preg_match("/[/s&\'\?\"]/", $ruser['user_name'])) cot_error('aut_notallowedname', 'rusername');
Where «[/s&\'\?\"]» set of unallowed symbols. https://github.com/macik
правильный хостинг — https://goo.gl/fjCa1F |
| tensh |
|
|---|---|
|
Thank you very much :) |