Merge branch 'fix/suspect_with_other_domain' into develop
This commit is contained in:
commit
ac36ae8bac
@ -112,8 +112,17 @@ class Suspect extends ObjectModel
|
||||
|
||||
public static function isBannished($email)
|
||||
{
|
||||
$domain_name = substr(strrchr($email, '@'), 1);
|
||||
if ($domain_name == 'qq.com') {
|
||||
$domain_name = strtolower(substr(strrchr($email, '@'), 1));
|
||||
|
||||
// Exclusion de domains spé
|
||||
$exclude_domains = array('qq.com','sina.com','tom.com','yahoo.cn','yahoo.com.cn','cntv.cn','sohu.com','vip.sohu.com','21cn.com');
|
||||
if (in_array($domain_name, $exclude_domains)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Exclusion de domains numériques (163, 69, ...)
|
||||
$domains = explode('.', $domain_name);
|
||||
if (is_numeric($domains[0])){
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user