Skip to content

Commit

Permalink
[FIX] Email sending with GDPR user data (#12487)
Browse files Browse the repository at this point in the history
Related to #11914
  • Loading branch information
sampaiodiego committed Oct 31, 2018
1 parent b77359c commit 1aad2d7
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ const sendEmail = function(userId) {
}
const userData = RocketChat.models.Users.findOneById(userId);

if (!userData || userData.emails || userData.emails[0] || userData.emails[0].address) {
if (!userData || !userData.emails || !userData.emails[0] || !userData.emails[0].address) {
return;
}
const emailAddress = `${ userData.name } <${ userData.emails[0].address }>`;
Expand Down

0 comments on commit 1aad2d7

Please sign in to comment.