# 帝国cms限制某些邮箱后缀注册账号，防止批量注册+灌水机的教程

*Published:* 2023-10-27
*Author:* 客服001

#### 温馨提醒

如果文章内容或图片资源失效，请留言反馈，我们会及时处理，谢谢

本文最后更新于2023年10月27日，已超过 180天没有更新



1、打开文件/e/member/class/member\_registerfun.php

2、搜索“//用户注册”

3、在里面的判断加上一行

```
if(strstr($email, '11px') || strstr($email, 'www.wdzzz.com'))
{
printerror("暂不支持该<a class="tag_link" href="https://www.xarjtc.com/tag/%e9%82%ae%e7%ae%b1" target="_blank" title="查看邮箱此标签更多文章"><abbr title="">邮箱</abbr></a>注册，请更换邮箱!","history.go(-1)",1,0,1);
}
```

释义：判断邮箱$email的提交值，是否包含“11px”或者“11pxcn”，如果包含就跳转提示页，终止注册。

多个禁止邮箱可以在后面继续手动添加判断条件：

```
|| strstr($email, 'www.hhymw.com' || strstr($email, 'm.hhymw.com' || strstr($email, 'hhymw.com'
```