Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/polls.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRené Gieling <github@dartcafe.de>2020-04-04 09:52:31 +0300
committerGitHub <noreply@github.com>2020-04-04 09:52:31 +0300
commit0ad5f4172e0ba85c9dc3d992fa043995b69f5c2a (patch)
treee11b2563557a713b3a51dbea386fd6104fbe9451 /lib
parentfdb34eba3d1f62277a8465d3d1d5e8d2c2796443 (diff)
parent1df664ca3daf741553db8ea08ea2157c08fe9819 (diff)
Merge pull request #874 from nextcloud/anonymous-notification
Keep the user anonymous #871
Diffstat (limited to 'lib')
-rw-r--r--lib/Service/MailService.php5
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();