From c88d205bb5845766db7c86ec553dfae951cf1a3c Mon Sep 17 00:00:00 2001 From: Marcel Folaron <47038998+marcelfolaron@users.noreply.github.com> Date: Mon, 1 Apr 2024 22:01:48 -0400 Subject: [PATCH] Update Notifications.php --- app/Domain/Notifications/Services/Notifications.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/Domain/Notifications/Services/Notifications.php b/app/Domain/Notifications/Services/Notifications.php index 71d44425d..6b67bdcc5 100644 --- a/app/Domain/Notifications/Services/Notifications.php +++ b/app/Domain/Notifications/Services/Notifications.php @@ -149,7 +149,11 @@ public function processMentions(string $content, string $module, int $moduleId, $emailMessage = $subject; $emailMessage .= sprintf($this->language->__('text.click_here'), $url); $mailer->setHtml($emailMessage); - $mailer->sendMail(array($taggedUser), $authorName); + + $taggedUserObject = $this->userRepository->getUser($taggedUser); + if(!empty($taggedUserObject['username'])) { + $mailer->sendMail(array($taggedUserObject['username']), $authorName); + } } } }