|
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?会员注册
x
 | |  | | 论坛使用纯数字用户名会和UID冲突,所以要在注册时就禁止用户使用纯数字注册。在论坛没有搜索到解决方案,自己搞了一个。以下是修改方法,贡献出来。 2 c7 m T1 y4 {. b5 d. ~
修改文件2个: : `0 s8 f' }2 F, i" {2 `. A
打开source\module\member\member_register.php 3 [! M2 a% t) b0 o$ Q4 j
查找第一处(共有3处),在第176行: 在下方添加: - if(preg_match('/^\d*$/', $username)) {
7 G! J# I$ o# d- ~ - showmessage('profile_username_isnumber');
, C i- p' A: R: y* w0 P. M - }
复制代码打开source\language\lang_message.php
" p( S" g( h( h, H% r: g1 m# Z查找 - 'profile_username_toolong' => '对不起,你的用户名超过 15 个字符,请返回输入一个较短的用户名。',
复制代码在上方添加: - 'profile_username_isnumber' => '对不起,本站不允许使用纯数字作为用户名。',
复制代码OK,以上代码已测试通过。 | |  |  |  | CooL.泪猪说: |
|