帝国CMS会员注册的时分,邮箱是必填项,但有时分,咱们期望注册时不需要填写邮箱,但帝国CMS并没有给这样一个能够封闭的设置项。
经过本教程就能够完成撤销邮箱必填。
以帝国CMS7.2为例:
翻开 /e/member/class/member_registerfun.php 文件
1、查找:
if(!chemail($email)) { printerror('EmailFail','',1); }
删去或许注释掉
2、持续查找:
if($pr['regemailonly']) { $num=$empire->gettotal("selectcount(*)astotalfrom".eReturnMemberTable()."where".egetmf('email')."='$email'limit1"); if($num) { printerror('ReEmailFail','',1); } }
删去或许注释
3、持续查找:
if(!$username||!$password||!$email)
修改为:
if(!$username||!$password)
也便是去掉了email
至此,搞定了!
声明:有的资源均来自网络转载,版权归原作者所有,如有侵犯到您的权益 请联系邮箱:123456@qq.com 我们将配合处理!
原文地址:帝国CMS取消会员注册时候的邮箱必填发布于2022-06-27 07:43:58