Discuz!X3.4修改用户名注册长度限制的方法

discuz教程
Discuz!X3.4用户名注册长度限制为15个字符,有些站长朋友觉得太短,需要改的长一点,但是很多人都不知道怎么修改,下面就告诉大家如何修改这个限制。按照以下步骤来就可以了!1、打开 /source/class/class_member.php 文件找到<p class="blockcode"><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改成你需要的数字到这里就全部改完了。

标签: