Skip to content

Commit

Permalink
Issue #3473583: Anonymous event enrolles see their names in emails
Browse files Browse the repository at this point in the history
  • Loading branch information
nechai authored and ribel committed Sep 12, 2024
1 parent 42d1947 commit 2e1fef5
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,13 @@ function social_swiftmail_preprocess_email(array &$variables): void {
/** @var \Drupal\symfony_mailer\EmailInterface $email */
$email = $variables['email'];
$context = $email->getParam('context');
if (empty($context)) {
// Symfony Mailer moves all parameters to a new property, so we
// should get the context from it if possible.
/* @see \Drupal\symfony_mailer\Plugin\EmailBuilder\LegacyEmailBuilder::createParams() */
$context = $email->getParam('legacy_message');
$context = $context['params']['context'] ?? NULL;
}

// In our Symfony Mailer we have the EmailAdjuster reroute plugin.
// If this is being applied to the emails we need a different way of getting
Expand Down

0 comments on commit 2e1fef5

Please sign in to comment.