mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-25 19:38:53 +00:00
#1297 - only check username length if name change is allowed
git-svn-id: file:///svn/phpbb/trunk@5751 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
2372c30785
commit
a22c4b96bf
1 changed files with 8 additions and 3 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue