论坛禁止使用纯数字作为注册用户名for Discuz! X1.5
论坛使用纯数字用户名会和UID冲突,所以要在注册时就禁止用户使用纯数字注册。在论坛没有搜索到解决方案,自己搞了一个。以下是修改方法,贡献出来。修改文件2个:
打开source\module\member\member_register.php
查找第一处(共有3处),在第176行:if(!$activation) {在下方添加:if(preg_match('/^\d*$/', $username)) {
showmessage('profile_username_isnumber');
}打开source\language\lang_message.php
查找'profile_username_toolong' => '对不起,你的用户名超过 15 个字符,请返回输入一个较短的用户名。',在上方添加:'profile_username_isnumber' => '对不起,本站不允许使用纯数字作为用户名。',OK,以上代码已测试通过。
页:
[1]