From 4576e62164a2a4804c162367ab375b87c29530a0 Mon Sep 17 00:00:00 2001 From: dartcafe Date: Tue, 23 Jun 2020 11:46:18 +0200 Subject: Hide usernames if results are hidden --- lib/Service/MailService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/Service/MailService.php b/lib/Service/MailService.php index e95f8784..5424494c 100644 --- a/lib/Service/MailService.php +++ b/lib/Service/MailService.php @@ -352,7 +352,7 @@ class MailService { foreach ($log as $logItem) { if ($logItem->getPollId() === $subscription->getPollId()) { - if ($poll->getAnonymous()) { + if ($poll->getAnonymous() || $poll->showResults() !== "always") { $displayUser = "A user"; } elseif ($this->userManager->get($logItem->getUserId()) instanceof IUser) { $displayUser = $this->userManager->get($logItem->getUserId())->getDisplayName(); -- cgit v1.2.3 From eb89a6d643b41ed7eb0c32876ba107d6b8274a68 Mon Sep 17 00:00:00 2001 From: dartcafe Date: Tue, 23 Jun 2020 12:02:00 +0200 Subject: Fix --- lib/Service/MailService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/Service/MailService.php b/lib/Service/MailService.php index 5424494c..915632f6 100644 --- a/lib/Service/MailService.php +++ b/lib/Service/MailService.php @@ -352,7 +352,7 @@ class MailService { foreach ($log as $logItem) { if ($logItem->getPollId() === $subscription->getPollId()) { - if ($poll->getAnonymous() || $poll->showResults() !== "always") { + if ($poll->getAnonymous() || $poll->getShowResults() !== "always") { $displayUser = "A user"; } elseif ($this->userManager->get($logItem->getUserId()) instanceof IUser) { $displayUser = $this->userManager->get($logItem->getUserId())->getDisplayName(); -- cgit v1.2.3