Make Posts respect the email privacy setting. Fixed in 7.6 branch only.

This commit is contained in:
Colin Kuskie 2008-12-01 22:50:38 +00:00
parent ab443b2572
commit f9d9de3cc6
2 changed files with 4 additions and 1 deletions

View file

@ -764,7 +764,9 @@ sub notifySubscribers {
my $returnAddress = $setting->get("mailReturnPath");
my $companyAddress = $setting->get("companyEmail");
my $listAddress = $cs->get("mailAddress");
my $posterAddress = $user->profileField("email");
my $posterAddress = $user->getProfileFieldPrivacySetting('email') eq "all"
? $user->profileField('email')
: '';
my $from = $posterAddress || $listAddress || $companyAddress;
my $replyTo = $listAddress || $returnAddress || $companyAddress;
my $sender = $listAddress || $companyAddress || $posterAddress;