The first step is to find the following code in the user.php file in the site Uc_client\model directory:
?
1 |
if ( $len > 15 || $len < 3 || preg_match( "/\s+|^c:\\con\\con|[%,\*\"\s\<\>\&]|$guestexp/is" , $username )) |
Change 15 to the maximum number you want, and change the 3 to the smallest number you want.
In the second step, the following code is found in the lang_message.php file in the Source/language directory of the Web site:
?
1 |
‘profile_username_tooshort‘ => ‘抱歉,您输入的用户名小于 3 个字符,请输入一个较长的用户名‘ , |
Change the 3 to the smallest number you want.
The third step, in the Web site source/language directory lang_message.php file, find the following code:
?
1 |
‘profile_username_toolong‘ => ‘抱歉,您的用户名超过 15 个字符,请输入一个较短的用户名‘ , |
Change 15 of these to the maximum number you want.
Fourth, find the following code in the Register.js file in the site Static/js directory:
?
123 |
if (unlen < 3 || unlen > 15) { errormessage(id, unlen < 3 ? ‘用户名小于 3 个字符‘ : ‘用户名超过 15 个字符‘ ); } |
Change 15 to the maximum number you want, and change the 3 to the smallest number you want.
Fifth, modify the length of the database field:
Pre_ucenter_member and Pre_common_member
The length of the username field in both tables is modified to the desired length
Discuze Modifying the user name length limit