Changeset 12863
- Timestamp:
- 01/27/2010 01:27:25 AM (15 years ago)
- Location:
- trunk/wp-includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/ms-deprecated.php
r12858 r12863 126 126 } 127 127 128 /** 129 * @deprecated 3.0 130 */ 131 function validate_email( $email, $check_domain = true) { 132 return is_email( $email, $check_domain ); 133 } 134 128 135 ?> -
trunk/wp-includes/ms-functions.php
r12858 r12863 900 900 } 901 901 902 function validate_email( $email, $check_domain = true) {903 if (ereg('^[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+'.'@'.904 '[-!#$%&\'*+\\/0-9=?A-Z^_`a-z{|}~]+\.'.905 '[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+$', $email))906 {907 if ($check_domain && function_exists('checkdnsrr')) {908 list (, $domain) = explode('@', $email);909 910 if (checkdnsrr($domain.'.', 'MX') || checkdnsrr($domain.'.', 'A'))911 return true;912 return false;913 }914 return true;915 }916 return false;917 }918 919 902 function is_email_address_unsafe( $user_email ) { 920 903 $banned_names = get_site_option( "banned_email_domains" ); … … 982 965 if ( !is_email( $user_email ) ) 983 966 $errors->add('user_email', __("Please enter a correct email address")); 984 985 if ( !validate_email( $user_email ) )986 $errors->add('user_email', __("Please check your email address."));987 967 988 968 $limited_email_domains = get_site_option( 'limited_email_domains' );
Note: See TracChangeset
for help on using the changeset viewer.