Discuz!X3.2 使用者名稱註冊長度限制為 15 個字元,有些站長朋友覺得太短,需要改的長一點,但是很多人都不知道怎麼修改,下面就告訴大家如何修改這個限制。按照以下步驟來就可以了!

1 、開啟 /source/class/class_member.php 檔案
找到
<p ><font size="4"></font><blockquote><font size="4">if($usernamelen < 3) {
    showmessage('profile_username_tooshort');
} elseif($usernamelen > 15) {
    showmessage('profile_username_toolong');</font>

將上面的 15 改成你需要的數字

2 、開啟 /source/language/lang_message.php 檔案
找到
<p><font size="4"> 'profile_username_toolong' => '抱歉,您的使用者名稱超過 15 個字元,請輸入一個較短的使用者名稱',</font></p>
把上面的 15 改成你需要的數字

3 、開啟 /source/language/mobile/lang_template.php 檔案
找到
<font size="4"> 'reg_username' => '使用者名稱必須為大於 3 位小於 15 位',</font>

<font size="4">'registerinputtip' => '使用者名稱:3-15 位',</font>
把上面的 15 都改成你需要的數字

4 、開啟 /source/module/forum/Forum_ajax.php 檔案
找到
<font size="4">if($usernamelen < 3) {
    showmessage('profile_username_tooshort', '', array(), array('handle' => false));
} elseif($usernamelen > 15) {
    showmessage('profile_username_toolong', '', array(), array('handle' => false));
 }</font>

把上面的 15 改成你需要的數字

到這裡就全部改完了。