帝国CMS注册时不需要填写邮箱的方法
495 人阅读 | 时间:2020年01月29日 08:51
阿里云服务器 | 腾讯云服务器 | 习梦云:高防云服务器 | ZJI:香港日本美国独服 |
LOCVPS服务周到 | HostKvm低调KVM VPS | 傲游主机:优质VPS | 80VPS:老牌VPS主机 |
搬瓦工:CN2 GIA线路 | CloudCone:性价比高 | Vultr:按小时计费VPS | VirMach:超级便宜 |
JustMySocks科学上网 | 好用的宝塔面板 | 洛杉矶QN机房官方VPS | 恒创:香港CN2服务器 |
帝国CMS会员注册的时候,邮箱是必填项,但有时候,我们希望注册时不需要填写邮箱,但帝国CMS并没有给这样一个可以关闭的设置项。
通过本教程就可以实现取消邮箱必填。
以帝国CMS7.2为例:
打开 /e/member/class/member_registerfun.php 文件
1、查找:
1 2 3 4 | if (!chemail( $email )) { printerror( 'EmailFail' , '' ,1); } |
删除或者注释掉
2、继续查找:
1 2 3 4 5 6 7 8 | if ( $pr [ 'regemailonly' ]) { $num = $empire ->gettotal( "select count(*) as total from " .eReturnMemberTable(). " where " .egetmf( 'email' ). "='$email' limit 1" ); if ( $num ) { printerror( 'ReEmailFail' , '' ,1); } } |
删除或者注释
3、继续查找:
1 | if (! $username ||! $password ||! $email ) |
修改为:
1 |
if (! $username ||! $password )
|
也就是去掉了email
至此,搞定了!
评论专区