BBCodeEmailAddressValidator::check_email_address( $strEmailAddress )
Description
Source
File: bp-forums/admin/parser.php
1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 | function check_email_address( $strEmailAddress ) { if (preg_match( '/[\x00-\x1F\x7F-\xFF]/' , $strEmailAddress )) { return false; } $intAtSymbol = strrpos ( $strEmailAddress , '@' ); if ( $intAtSymbol === false) { return false; } $arrEmailAddress [0] = substr ( $strEmailAddress , 0, $intAtSymbol ); $arrEmailAddress [1] = substr ( $strEmailAddress , $intAtSymbol + 1); $arrTempAddress [0] = preg_replace( '/"[^"]+"/' , '' , $arrEmailAddress [0]); $arrTempAddress [1] = $arrEmailAddress [1]; $strTempAddress = $arrTempAddress [0] . $arrTempAddress [1]; if ( strrpos ( $strTempAddress , '@' ) !== false) { return false; } if (! $this ->check_local_portion( $arrEmailAddress [0])) { return false; } if (! $this ->check_domain_portion( $arrEmailAddress [1])) { return false; } return true; } |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.