diff options
| author | Igor Wiedler <igor@wiedler.ch> | 2010-12-05 13:51:09 +0100 |
|---|---|---|
| committer | Igor Wiedler <igor@wiedler.ch> | 2010-12-05 13:51:09 +0100 |
| commit | 5a4938c27001cd4f0aad4efcc72175e7a7bd30a6 (patch) | |
| tree | 53fbd9b2ce4b7e20a4af6abb15ec7a80840b6e9f | |
| parent | e80253209fbb46964db10b18dc09b5bbdf9a46d8 (diff) | |
| parent | 7a3d6a8168c7cd7da4f3ff462579ed562d0432a1 (diff) | |
| download | forums-5a4938c27001cd4f0aad4efcc72175e7a7bd30a6.tar forums-5a4938c27001cd4f0aad4efcc72175e7a7bd30a6.tar.gz forums-5a4938c27001cd4f0aad4efcc72175e7a7bd30a6.tar.bz2 forums-5a4938c27001cd4f0aad4efcc72175e7a7bd30a6.tar.xz forums-5a4938c27001cd4f0aad4efcc72175e7a7bd30a6.zip | |
Merge branch 'ticket/rmgcirr83/8736' into develop-olympus
* ticket/rmgcirr83/8736:
[ticket/8736] guest can have 255 chars long username
| -rw-r--r-- | phpBB/posting.php | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/phpBB/posting.php b/phpBB/posting.php index f775699cee..7368026136 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -861,11 +861,18 @@ if ($submit || $preview || $refresh) { include($phpbb_root_path . 'includes/functions_user.' . $phpEx); + $user->add_lang('ucp'); + if (($result = validate_username($post_data['username'], (!empty($post_data['post_username'])) ? $post_data['post_username'] : '')) !== false) { - $user->add_lang('ucp'); $error[] = $user->lang[$result . '_USERNAME']; } + + if (($result = validate_string($post_data['username'], false, $config['min_name_chars'], $config['max_name_chars'])) !== false) + { + $min_max_amount = ($result == 'TOO_SHORT') ? $config['min_name_chars'] : $config['max_name_chars']; + $error[] = sprintf($user->lang['FIELD_' . $result], $user->lang['USERNAME'], $min_max_amount); + } } if ($config['enable_post_confirm'] && !$user->data['is_registered'] && in_array($mode, array('quote', 'post', 'reply'))) |
