mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
Merge branch 'ticket/rmgcirr83/8736' into develop-olympus
* ticket/rmgcirr83/8736: [ticket/8736] guest can have 255 chars long username
This commit is contained in:
commit
5a4938c270
1 changed files with 8 additions and 1 deletions
|
@ -861,11 +861,18 @@ if ($submit || $preview || $refresh)
|
||||||
{
|
{
|
||||||
include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
|
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)
|
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'];
|
$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')))
|
if ($config['enable_post_confirm'] && !$user->data['is_registered'] && in_array($mode, array('quote', 'post', 'reply')))
|
||||||
|
|
Loading…
Add table
Reference in a new issue