diff options
author | dartcafe <github@dartcafe.de> | 2021-12-13 21:26:36 +0300 |
---|---|---|
committer | dartcafe <github@dartcafe.de> | 2021-12-13 21:26:36 +0300 |
commit | cf21d0babb769c02495ed3da45fed3ec14c9817a (patch) | |
tree | d02269248460ae4745e727e0bcf43846f7d518ff /lib/Service/ShareService.php | |
parent | 62b03e01c1acce52495c4ba190bacbe388be0241 (diff) |
fix #2137
Signed-off-by: dartcafe <github@dartcafe.de>
Diffstat (limited to 'lib/Service/ShareService.php')
-rw-r--r-- | lib/Service/ShareService.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Service/ShareService.php b/lib/Service/ShareService.php index 688e00d0..a4dde8db 100644 --- a/lib/Service/ShareService.php +++ b/lib/Service/ShareService.php @@ -385,7 +385,10 @@ class ShareService { } $this->systemService->validatePublicUsername($userName, $token); - $this->systemService->validateEmailAddress($emailAddress, $poll->getPublicPollEmail() !== 'mandatory'); + + if ($this->share->getPublicPollEmail() !== Share::EMAIL_DISABLED) { + $this->systemService->validateEmailAddress($emailAddress, $this->share->getPublicPollEmail() !== Share::EMAIL_MANDATORY); + } if ($this->share->getType() === Share::TYPE_PUBLIC) { // Create new external share for user, who entered the poll via public link, |