|
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?会员注册
x
 | |  | | 论坛使用纯数字用户名会和UID冲突,所以要在注册时就禁止用户使用纯数字注册。在论坛没有搜索到解决方案,自己搞了一个。以下是修改方法,贡献出来。
2 F# x( `0 U2 N. S+ Z7 Z1 L6 ?修改文件2个:
! X$ a0 {4 e/ @$ q" ]; k打开source\module\member\member_register.php
! |8 _, v* s- m3 g5 O查找第一处(共有3处),在第176行: 在下方添加: - if(preg_match('/^\d*$/', $username)) {
5 F$ |5 L0 V( G5 m( z - showmessage('profile_username_isnumber');$ ^) Y/ L Z; r; K( O) K' m P3 Y+ g
- }
复制代码打开source\language\lang_message.php
# b; \* I* r' V3 r查找 - 'profile_username_toolong' => '对不起,你的用户名超过 15 个字符,请返回输入一个较短的用户名。',
复制代码在上方添加: - 'profile_username_isnumber' => '对不起,本站不允许使用纯数字作为用户名。',
复制代码OK,以上代码已测试通过。 | |  |  |  | CooL.泪猪说: |
|