Changeset 2384

Show
Ignore:
Timestamp:
03/30/2008 11:29:14 AM (8 months ago)
Author:
Geert
Message:

Optimized valid::email_domain()

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/system/helpers/valid.php

    r2373 r2384  
    3333        { 
    3434                // Check if the email domain has a valid MX record 
    35                 return (bool) checkdnsrr(preg_replace('/^.+@(.+)$/', '$1', $email), 'MX'); 
     35                return (bool) checkdnsrr(preg_replace('/^[^@]+@/', '', $email), 'MX'); 
    3636        } 
    3737