From a22c4b96bfed52433324ca3618229e411a1bdfc8 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Tue, 28 Mar 2006 18:09:55 +0000 Subject: [PATCH] #1297 - only check username length if name change is allowed git-svn-id: file:///svn/phpbb/trunk@5751 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/ucp/ucp_profile.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/phpBB/includes/ucp/ucp_profile.php b/phpBB/includes/ucp/ucp_profile.php index 77d26212bf..75ebe73040 100644 --- a/phpBB/includes/ucp/ucp_profile.php +++ b/phpBB/includes/ucp/ucp_profile.php @@ -48,9 +48,6 @@ class ucp_profile } $var_ary = array( - 'username' => array( - array('string', false, $config['min_name_chars'], $config['max_name_chars']), - array('username', $data['username'])), 'password_confirm' => array('string', true, $config['min_pass_chars'], $config['max_pass_chars']), 'new_password' => array('string', true, $config['min_pass_chars'], $config['max_pass_chars']), 'cur_password' => array('string', true, $config['min_pass_chars'], $config['max_pass_chars']), @@ -60,6 +57,14 @@ class ucp_profile 'email_confirm' => array('string', true, 6, 60), ); + if ($auth->acl_get('u_chgname') && $config['allow_namechange']) + { + $var_ary['username'] = array( + array('string', false, $config['min_name_chars'], $config['max_name_chars']), + array('username', $data['username']), + ); + } + $error = validate_data($data, $var_ary); extract($data); unset($data);