Skip to content
Snippets Groups Projects
Commit 2b8691fc authored by Alexandre Dias's avatar Alexandre Dias
Browse files

Merge branch 'ISAICP-9617' into 'develop'

ISAICP-9617: Do not attempt to send the announcement to non existing user.

See merge request digit/digit-joinup-dev!2024
parents f9539813 d291e2a4
No related branches found
No related tags found
2 merge requests!215Release 2.3.2,!214ISAICP-9579: Fix SearchWidget: refer own submit callbacks precisely to prevent...
......@@ -170,6 +170,9 @@ protected function sendMessage(MessageInterface $message, array $recipients_meta
return array_reduce($recipients_metadata, function (bool $success, array $recipient_metadata) use ($message): bool {
if ($message instanceof AnnouncementInterface) {
$account = user_load_by_mail($recipient_metadata['options']['mail']);
if (!$account) {
return FALSE;
}
$message->setArguments($message->getArguments() + static::getAnnouncementTokenMappings());
$message->setOwner($account);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment