Conditions | 8 |
Paths | 4 |
Total Lines | 18 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
13 | public static function execute($email, $disable_dns_check = false) |
||
14 | { |
||
15 | $email = trim($email); |
||
16 | |||
17 | if (!empty($email) && (strlen($email) <= 255) && filter_var($email, FILTER_VALIDATE_EMAIL)) { |
||
18 | if (($disable_dns_check === false) && (ENTRY_EMAIL_ADDRESS_CHECK == 'true')) { |
||
19 | $domain = explode('@', $email); |
||
20 | |||
21 | if (!checkdnsrr($domain[1], 'MX') && !checkdnsrr($domain[1], 'A')) { |
||
22 | return false; |
||
23 | } |
||
24 | } |
||
25 | |||
26 | return true; |
||
27 | } |
||
28 | |||
29 | return false; |
||
30 | } |
||
31 | } |
||
32 |