If you
did want to add spaces for the no-special-characters case, you could do it like this:
adduser.php (6.1b1), change:
code:
// No special characters
if (!$config['specialc']) {
if (!preg_match("/^\w+$/",$Username)) {
$html -> not_right($ubbt_lang['BAD_UNAME'],$Cat);
}
}
to:
code:
// No special characters
if (!$config['specialc']) {
$username_pattern = '{
^\w # must start with word-character [A-Za-z0-9_]
[\w ]* # zero or more word-characters or spaces
\w$ # must end with word-character
}x'; # x-modifier removes whitespace and comments from pattern
if (!preg_match($username_pattern,$Username)) {
$html -> not_right($ubbt_lang['BAD_UNAME'],$Cat);
}
}