Skip to content

Commit

Permalink
Merge branch 'hotfix/1.5.5'
Browse files Browse the repository at this point in the history
  • Loading branch information
richardhj committed Apr 1, 2019
2 parents c046d5d + 0534b18 commit 5823680
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions library/NotificationCenter/ContaoHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ public function sendRegistrationEmail($intId, $arrData, $objModule)
return;
}

if (version_compare(VERSION, '4.7', '>=')) {
/** @var \Contao\CoreBundle\OptIn\OptIn $optIn */
$optIn = \Contao\System::getContainer()->get('contao.opt-in');
$optInToken = $optIn->create('reg-', $arrData['email'], array('tl_member' => array($arrData['id'])));

$arrData['activation'] = $optInToken->getIdentifier();
}

$arrTokens = array(
'link' => \Environment::get('base') . \Environment::get('request') . (($GLOBALS['TL_CONFIG']['disableAlias'] || strpos(\Environment::get('request'), '?') !== false) ? '&' : '?') . 'token=' . $arrData['activation']
);
Expand Down
1 change: 1 addition & 0 deletions modules/ModuleNewsletterActivateNotificationCenter.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ protected function activateRecipient($token)
}

$strEmail = $objRecipient->email;
$objRecipient->reset();
}

$time = time();
Expand Down

0 comments on commit 5823680

Please sign in to comment.