public function getUserVoted($userId)
    {
        return (new Query())->from('{{%podium_poll_vote}}')->where([
            'poll_id' => $this->id,
            'caster_id' => $userId
        ])->count('id') ? true : false;
    }
public function getUserVoted($userId)
    {
        return (new Query())->from('{{%podium_poll_vote}}')->where([
            'poll_id' => $this->id,
            'caster_id' => $userId
        ])->count('id') ? true : false;
    }
public function getUserVoted ( $ userId ) { return ( new Query ( ) ) -> from ( '{{%podium_poll_vote}}' ) -> where ( [ 'poll_id' => $ this -> id , 'caster_id' => $ userId ] ) -> count ( 'id' ) ? true : false ; }
Checks if user has already voted in poll.
@param int $userId
@return bool
Checks if user has already voted in poll .