# HG changeset patch # User indvdum (gotoindvdum[at]gmail[dot]com) # Date 1331332760 -14400 # Node ID 36b05a593b411362752ab2eafa40fc84722afe82 # Parent 049ab39a9b9cc0408466da3b4ee873b5bfae6c2b Fix username allowed characters (like Cubometry game) diff -r 049ab39a9b9c -r 36b05a593b41 includes/functions_user.php --- a/includes/functions_user.php Sat Mar 10 00:53:57 2012 +0400 +++ b/includes/functions_user.php Sat Mar 10 02:39:20 2012 +0400 @@ -1501,7 +1501,7 @@ case 'USERNAME_ALPHA_SPACERS': $pcre = true; - $regex = '[A-Za-z0-9-[\]_+ ]+'; + $regex = '[A-Za-z0-9-_]+'; break; case 'USERNAME_LETTER_NUM': @@ -3587,4 +3587,4 @@ return $user_data['group_id']; } -?> \ No newline at end of file +?> diff -r 049ab39a9b9c -r 36b05a593b41 language/en/ucp.php --- a/language/en/ucp.php Sat Mar 10 00:53:57 2012 +0400 +++ b/language/en/ucp.php Sat Mar 10 02:39:20 2012 +0400 @@ -472,7 +472,7 @@ 'UPLOAD_AVATAR_URL' => 'Upload from a URL', 'UPLOAD_AVATAR_URL_EXPLAIN' => 'Enter the URL of the location containing the image. The image will be copied to this site.', 'USERNAME_ALPHA_ONLY_EXPLAIN' => 'Username must be between %1$d and %2$d chars long and use only alphanumeric characters.', - 'USERNAME_ALPHA_SPACERS_EXPLAIN'=> 'Username must be between %1$d and %2$d chars long and use alphanumeric, space or -+_[] characters.', + 'USERNAME_ALPHA_SPACERS_EXPLAIN'=> 'Username must be between %1$d and %2$d chars long and use alphanumeric or -_ characters.', 'USERNAME_ASCII_EXPLAIN' => 'Username must be between %1$d and %2$d chars long and use only ASCII characters, so no special symbols.', 'USERNAME_LETTER_NUM_EXPLAIN' => 'Username must be between %1$d and %2$d chars long and use only letter or number characters.', 'USERNAME_LETTER_NUM_SPACERS_EXPLAIN'=> 'Username must be between %1$d and %2$d chars long and use letter, number, space or -+_[] characters.', @@ -558,4 +558,4 @@ 'NO_NONMEMBER' => 'No non-member groups', )); -?> \ No newline at end of file +?> diff -r 049ab39a9b9c -r 36b05a593b41 language/ru/ucp.php --- a/language/ru/ucp.php Sat Mar 10 00:53:57 2012 +0400 +++ b/language/ru/ucp.php Sat Mar 10 02:39:20 2012 +0400 @@ -472,7 +472,7 @@ 'UPLOAD_AVATAR_URL' => 'Загрузить с URL', 'UPLOAD_AVATAR_URL_EXPLAIN' => 'Введите URL, по которому находится файл с изображением. Оно будет скопировано на этот сайт.', 'USERNAME_ALPHA_ONLY_EXPLAIN' => 'Имя пользователя должно быть от %1$d до %2$d знаков и должно содержать только буквы.', - 'USERNAME_ALPHA_SPACERS_EXPLAIN'=> 'Имя пользователя должно быть от %1$d до %2$d знаков и должно содержать только буквы, пробел или символы -+_[]', + 'USERNAME_ALPHA_SPACERS_EXPLAIN'=> 'Имя пользователя должно быть от %1$d до %2$d знаков и должно содержать только буквы, цифры или символы -_', 'USERNAME_ASCII_EXPLAIN' => 'Имя пользователя должно быть от %1$d до %2$d знаков и должно содержать только символы ASCII, без специальных символов.', 'USERNAME_LETTER_NUM_EXPLAIN' => 'Имя пользователя должно быть от %1$d до %2$d знаков и должно содержать только буквы или цифры.', 'USERNAME_LETTER_NUM_SPACERS_EXPLAIN'=> 'Имя пользователя должно быть от %1$d до %2$d знаков и должно содержать только буквы, цифры, пробел или символы -+_[]', @@ -558,4 +558,4 @@ 'NO_NONMEMBER' => 'Нет пустых групп', )); -?> \ No newline at end of file +?>