if ( !$notify_to ) {
return false;
}
+ $validEmail = filter_var( $notify_to, FILTER_VALIDATE_EMAIL );
+ if ( !$validEmail ) {
+ return false;
+ }
$memberInfoData = new GlmDataMemberInfo( $this->wpdb, $this->config );
$memberInfo = $memberInfoData->getActiveInfoForMember( $memberId );
if ( !$notify_to ) {
return false;
}
+ // Double check the email for valid address
+ $emails = explode( ',', $notify_to );
+ foreach ( $emails as $email ) {
+ $validEmail = filter_var( $email, FILTER_VALIDATE_EMAIL );
+ if ( !$validEmail ) {
+ return false;
+ }
+ }
// Setup the Smarty Engine
$smarty = new smartyTemplateSupport();