IITT网络服务中心
标题:
DISCUZX3.2 修改注册用户名长度解决方案
[打印本页]
作者:
admin
时间:
2018-3-22 12:54
标题:
DISCUZX3.2 修改注册用户名长度解决方案
#——请一定要备份!!
1./source/class/目录下的class_member.php文件中, 找到如下代码:
if($usernamelen < 3) {
showmessage('profile_username_tooshort');
} elseif($usernamelen > 15) {
showmessage('profile_username_toolong');
}
复制代码
修改为:
if($usernamelen < 3) {
showmessage('profile_username_tooshort');
} elseif($usernamelen > 20) {
showmessage('profile_username_toolong');
}
复制代码
2./source/language/目录下的lang_message.php文件中, 找到如下代码:
'profile_username_toolong' => '抱歉,您的用户名超过 15 个字符,请输入一个较短的用户名',
复制代码
修改为:
'profile_username_toolong' => '抱歉,您的用户名超过 20个字符,请输入一个较短的用户名',
复制代码
3./source/language/mobile/目录下的lang_template.php文件中, 找到如下代码:
'reg_username' => '用户名必须为大于3位小于15位',
复制代码
修改为:
'reg_username' => '用户名必须为大于3位小于20位',
复制代码
4.站/source/module/forum/Forum_ajax.php 文件中, 找到如下代码:
if($usernamelen < 3) {
showmessage('profile_username_tooshort', '', array(), array('handle' => false));
} elseif($usernamelen > 15) {
showmessage('profile_username_toolong', '', array(), array('handle' => false));
}
复制代码
修改为:
if($usernamelen < 3) {
showmessage('profile_username_tooshort', '', array(), array('handle' => false));
} elseif($usernamelen > 20) {
showmessage('profile_username_toolong', '', array(), array('handle' => false));
}
复制代码
5.替换同名文件,更新缓存,注册用户名最大 就是10个中文 20个字符了
请一定要备份!!
欢迎光临 IITT网络服务中心 (http://service.iitt.cc/)
Powered by Discuz! X3