diff options
Diffstat (limited to 'lib/Service/VoteService.php')
-rw-r--r-- | lib/Service/VoteService.php | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/Service/VoteService.php b/lib/Service/VoteService.php index 5073b732..7534b258 100644 --- a/lib/Service/VoteService.php +++ b/lib/Service/VoteService.php @@ -34,7 +34,7 @@ use OCA\Polls\Service\AnonymizeService; use OCA\Polls\Service\LogService; use OCA\Polls\Model\Acl; -class VoteService { +class VoteService { /** @var VoteMapper */ private $voteMapper; @@ -114,13 +114,12 @@ class VoteService { public function set($optionId, $setTo, $token = '') { $option = $this->optionMapper->find($optionId); - $pollId = $option->getPollId(); if (!$this->acl->setPollIdOrToken($option->getPollId(), $token)->getAllowVote()) { throw new NotAuthorizedException; } - if (!$option->getPollId() === $this->acl->getPollId()) { + if ($option->getPollId() !== $this->acl->getPollId()) { throw new NotAuthorizedException; } |