From 3f02bd2a3e1f3151cfda275db2e337a90290b811 Mon Sep 17 00:00:00 2001 From: Simon L Date: Thu, 21 Sep 2023 15:16:48 +0200 Subject: [PATCH] return if user is empty Signed-off-by: Simon L --- lib/Notification/Notifier.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/Notification/Notifier.php b/lib/Notification/Notifier.php index 7f217e7d3..70eea2a91 100644 --- a/lib/Notification/Notifier.php +++ b/lib/Notification/Notifier.php @@ -131,6 +131,9 @@ public function prepare(INotification $notification, string $languageCode): INot protected function getSubject(INotification $notification, string $languageCode): string { $l = $this->factory->get('firstrunwizard', $languageCode); $user = $this->userManager->get($notification->getUser()); + if ($user === null) { + return ''; + } $email = $user->getEMailAddress(); if ($email === null || $email === '') {