aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2006-03-28 18:09:55 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2006-03-28 18:09:55 +0000
commita22c4b96bfed52433324ca3618229e411a1bdfc8 (patch)
tree2730e97fabbffcce145e158ac236a772087606be
parent2372c30785a15381786ae2c7f4851f15f5ea85e8 (diff)
downloadforums-a22c4b96bfed52433324ca3618229e411a1bdfc8.tar
forums-a22c4b96bfed52433324ca3618229e411a1bdfc8.tar.gz
forums-a22c4b96bfed52433324ca3618229e411a1bdfc8.tar.bz2
forums-a22c4b96bfed52433324ca3618229e411a1bdfc8.tar.xz
forums-a22c4b96bfed52433324ca3618229e411a1bdfc8.zip
#1297 - only check username length if name change is allowed
git-svn-id: file:///svn/phpbb/trunk@5751 89ea8834-ac86-4346-8a33-228a782c2dd0
-rw-r--r--phpBB/includes/ucp/ucp_profile.php11
1 files 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);