improved blacklist and whitelist on email validation, now domains can be listed to.

This commit is contained in:
Marcel Naeve 2016-05-04 03:25:14 +02:00
parent 5d6a41ea85
commit 9a685c1f8d
1 changed files with 2 additions and 2 deletions

View File

@ -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;
} }