improved blacklist and whitelist on email validation, now domains can be listed to.
This commit is contained in:
parent
5d6a41ea85
commit
9a685c1f8d
|
@ -26,13 +26,13 @@ class Validate
|
||||||
|
|
||||||
// Whitelisted?
|
// Whitelisted?
|
||||||
if(isset($lists['whitelist'])) {
|
if(isset($lists['whitelist'])) {
|
||||||
if(in_array($email, $lists['whitelist']))
|
if(in_array($email, $lists['whitelist']) || in_array($split[1], $lists['whitelist']))
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Blacklisted?
|
// Blacklisted?
|
||||||
if(isset($lists['blacklist'])) {
|
if(isset($lists['blacklist'])) {
|
||||||
if(in_array($email, $lists['blacklist']))
|
if(in_array($email, $lists['blacklist']) || in_array($split[1], $lists['blacklist']))
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue