else { $mail =
$container->
get(Shopware_Components_TemplateMail::
class)->
createMail('sOPTINREGISTER',
$context);
} $mail->
addTo($customer->
getEmail());
$mail->
send();
} private function doubleOptInSaveHash(Customer
$customer, string
$hash): int
{ /** @var Request|null $request */
$request =
Shopware()->
Container()->
get('front'
)->
Request();
$fromCheckout =
$request &&
$request->
getParam('sTarget'
) === 'checkout';
$sql = "INSERT INTO `s_core_optin` (`type`, `datum`, `hash`, `data`)
VALUES ('swRegister', ?, ?, ?)";
// Needs to be compatible with the sREGISTERCONFIRMATION context
$mailContext =
[ 'email' =>
$customer->
getEmail(),
'sMAIL' =>
$customer->
getEmail(),
'firstname' =>
$customer->
getFirstname(),
'lastname' =>
$customer->
getLastname(),
'salutation' =>
$customer->
getSalutation(),