$context,
[ 'customer' =>
$customer,
] );
if (((int) $customer->
getAccountMode()) === 1
) { $mail =
$container->
get(Shopware_Components_TemplateMail::
class)->
createMail('sOPTINREGISTERACCOUNTLESS',
$context);
} 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', ?, ?, ?)";