Discuze Modifying the user name length limit

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.