Forums / Cotonti / Support / [solved] Prevent spaces and extra letters in user name?

Macik
#36150 2012-11-06 11:11

It needs simple plugin creation with «hooked» on users.register.add.validate

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