$this->eventDispatcher->
dispatch($event);
$response->headers->
set(PlatformRequest::HEADER_CONTEXT_TOKEN,
$newToken);
return $response;
} private function getBeforeConfirmValidation(string
$emHash): DataValidationDefinition
{ $definition =
new DataValidationDefinition('registration.opt_in_before'
);
$definition->
add('em',
new EqualTo(['value' =>
$emHash]));
$definition->
add('doubleOptInRegistration',
new IsTrue());
return $definition;
}}