MDL-13572 do not send messages to invalid addresses
This commit is contained in:
+1
-1
@@ -996,7 +996,7 @@ function message_post_message($userfrom, $userto, $message, $format, $messagetyp
|
||||
$messagehtml = NULL;
|
||||
}
|
||||
|
||||
if (!empty($preference->message_emailaddress)) {
|
||||
if (!empty($preference->message_emailaddress) and validate_email($preference->message_emailaddress)) {
|
||||
$userto->email = $preference->message_emailaddress; // Use custom messaging address
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user