fix optOut

This commit is contained in:
yuri
2015-10-21 10:07:15 +03:00
parent c5296bf906
commit 61957e628b
@@ -75,11 +75,8 @@ class Unsubscribe extends \Espo\Core\EntryPoints\Base
$link = $m[$target->getEntityType()];
}
if ($link) {
if ($campaign) {
$targetListList = $campaign->get('targetLists');
} else {
$targetListList = $massEmail->get('targetLists');
}
$targetListList = $massEmail->get('targetLists');
foreach ($targetListList as $targetList) {
$this->getEntityManager()->getRepository('TargetList')->updateRelation($targetList, $link, $target->id, array(
'optedOut' => true