diff options
author | René Gieling <github@dartcafe.de> | 2020-04-04 09:52:31 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-04 09:52:31 +0300 |
commit | 0ad5f4172e0ba85c9dc3d992fa043995b69f5c2a (patch) | |
tree | e11b2563557a713b3a51dbea386fd6104fbe9451 /lib | |
parent | fdb34eba3d1f62277a8465d3d1d5e8d2c2796443 (diff) | |
parent | 1df664ca3daf741553db8ea08ea2157c08fe9819 (diff) |
Merge pull request #874 from nextcloud/anonymous-notification
Keep the user anonymous #871
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Service/MailService.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Service/MailService.php b/lib/Service/MailService.php index 47eaf2e4..12a0e134 100644 --- a/lib/Service/MailService.php +++ b/lib/Service/MailService.php @@ -364,8 +364,9 @@ class MailService { foreach ($log as $logItem) { if ($logItem->getPollId() === $subscription->getPollId()) { - - if ($this->userManager->get($logItem->getUserId()) instanceof IUser) { + if ($poll->getAnonymous()) { + $displayUser = "A user"; + } elseif ($this->userManager->get($logItem->getUserId()) instanceof IUser) { $displayUser = $this->userManager->get($logItem->getUserId())->getDisplayName(); } else { $displayUser = $logItem->getUserId(); |