无限星辰工作室-客户无限互联网动力之源

标题: DISCUZX3.2 修改注册用户名长度解决方案 [打印本页]

作者: crx349    时间: 2016-3-21 20:27
标题: DISCUZX3.2 修改注册用户名长度解决方案
1./source/class/目录下的class_member.php文件中, 找到如下代码:
  1.         if($usernamelen < 3) {
  2.                                         showmessage('profile_username_tooshort');
  3.                                 } elseif($usernamelen > 15) {
  4.                                         showmessage('profile_username_toolong');
  5.                                 }
复制代码


改成:
     
  1.   if($usernamelen < 3) {
  2.                                         showmessage('profile_username_tooshort');
  3.                                 } elseif($usernamelen > 20) {
  4.                                         showmessage('profile_username_toolong');
  5.                                 }
复制代码


2./source/language/目录下的lang_message.php文件中, 找到如下代码:
  1. 'profile_username_toolong' => '抱歉,您的用户名超过 15 个字符,请输入一个较短的用户名',
复制代码

改成:
  1. 'profile_username_toolong' => '抱歉,您的用户名超过 20个字符,请输入一个较短的用户名',
复制代码

3./source/language/mobile/目录下的lang_template.php文件中, 找到如下代码:
  1. 'reg_username' => '用户名必须为大于3位小于15位',
复制代码

改成:
  1. 'reg_username' => '用户名必须为大于3位小于20位',
复制代码

4.站/source/module/forum/Forum_ajax.php 文件中, 找到如下代码:
  1. if($usernamelen < 3) {
  2.                 showmessage('profile_username_tooshort', '', array(), array('handle' => false));
  3.         } elseif($usernamelen > 15) {
  4.                 showmessage('profile_username_toolong', '', array(), array('handle' => false));
  5.         }
复制代码

改成:
  1. if($usernamelen < 3) {
  2.                 showmessage('profile_username_tooshort', '', array(), array('handle' => false));
  3.         } elseif($usernamelen > 20) {
  4.                 showmessage('profile_username_toolong', '', array(), array('handle' => false));
  5.         }
复制代码


5.替换同名文件,更新缓存,注册用户名最大 就是10个中文 20个字符了




欢迎光临 无限星辰工作室-客户无限互联网动力之源 (https://www.xmspace.net/) Powered by Discuz! X3.4