帝国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
至此,搞定了!
未经允许不得转载:Just My Socks中文教程网 » 帝国CMS注册时不需要填写邮箱的方法
Just My Socks中文教程网
【教程】帝国cms生成文章报错502 Bad Gateway解决办法
帝国CMS使用教程:百度收录/e/extend/infocomment/commentajax.php?classid=xxxx&id=xxx


