diff options
Diffstat (limited to 'phpBB/posting.php')
-rw-r--r-- | phpBB/posting.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/phpBB/posting.php b/phpBB/posting.php index ff42fc2886..bcd6f0f7bb 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -689,13 +689,14 @@ if ($submit || $preview || $refresh) } // Validate username - if (($post_data['username'] && !$user->data['is_registered']) || ($mode == 'edit' && $post_data['post_username'])) + if (($post_data['username'] && !$user->data['is_registered']) || ($mode == 'edit' && $post_data['username'] && $post_data['post_username'] != $post_data['username'])) { include($phpbb_root_path . 'includes/functions_user.' . $phpEx); - if (($result = validate_username(($mode == 'edit' && $post_data['post_username']) ? $post_data['post_username'] : $post_data['username'])) != false) + if (($result = validate_username($post_data['username'])) !== false) { - $error[] = $user->lang[$result]; + $user->add_lang('ucp'); + $error[] = $user->lang[$result . '_USERNAME']; } } |