In register.php find:
if (strlen($username)<$minuserlength) {
before that add:
------ cut -----------
// enter not allowed chars here seperated with a space:
$illegaluserchars=', . ~ ;';
$dontlethimuse=explode(" ",$illegaluserchars);
while (list($key,$val)=each($dontlethimuse))
{
if (strpos($username,$val))
{
eval("standarderror(\"".gettemplate("error_notallo wedusername")."\");");exit;
}
}
------ cut -----------
Create a template named "error_notallowedusername" and specify your error message that will be posted if someone enters an invalid char.
This is not tested so it may require some polishing and debugging, but needless to say, you can handle it perfectly. Also dont forget to add another if clause if you want to ban space or ' char..Enjoy..
Regards,
Logician
|