Add voter

@param User $voter

@return Poll
975632
public function addVoter(User $voter)
    {
        if ($this->voters->contains($voter) === false) {
            $this->voters->add($voter);
        }

        return $this;
    }
724981
public function addUser(ChildUser $user)
    {
        if ($this->collUsers === null) {
            $this->initUsers();
        }

        if (!$this->getUsers()->contains($user)) {
            // only add it if the **same** object is not already associated
            $this->collUsers->push($user);
            $this->doAddUser($user);
        }

        return $this;
    }
6908
public function ballot($user_id = 0, $ip = null)
	{
		if (User::isGuest())
		{
			$vote = new Vote();
			$vote->set('item_type', 'comment');
			$vote->set('item_id', $this->get('id'));
			$vote->set('created_by', $user_id);
			$vote->set('ip', $ip);

			return $vote;
		}

		$user = $user_id ? User::getInstance($user_id) : User::getInstance();
		$ip   = $ip ?: Request::ip();

		// See if a person from this IP has already voted in the last week
		$votes = $this->votes();

		if ($user->get('id'))
		{
			$votes->whereEquals('created_by', $user->get('id'));
		}
		elseif ($ip)
		{
			$votes->whereEquals('ip', $ip);
		}

		$vote = $votes
			->ordered()
			->limit(1)
			->row();

		if (!$vote || !$vote->get('id'))
		{
			$vote = new Vote();
			$vote->set('item_type', 'comment');
			$vote->set('item_id', $this->get('id'));
			$vote->set('created_by', $user_id);
			if ($ip)
			{
				$vote->set('ip', $ip);
			}
		}

		return $vote;
	}
172711
public function addUser($user)
    {
        if (!$this->hasUser($user)) {
            return RoleUser::create(['role_id' => $this->id, 'user_id' => $user->id]);
        }

        return false;
    }
695827
public static function AddNewUserToSession($caller, $user) {
        $users = self::GetAndStoreUsersInSession($caller);
        $users[] = $user;
        $caller->app()->user->setAttribute(
                \Puzzlout\Framework\Enums\SessionKeys::AllUsers, $users
        );
    }
1152162
public function setUser(User $user)
    {
        $this->user = $user;

        unset($_SESSION[self::class][$this->getConfig()->getEntityID()]['user']);

        $_SESSION[self::class][$this->getConfig()->getEntityID()]['user'] = $this->user->toArray();
        $this->setRole($this->user->getCurrentRole());
        $this->setLocalUsername($this->user->getLocalUsername());

        return $this;
    }
101851
public function addUser($user, $password)
    {
        $params = [
            'name' => $user,
            'password' => $password,
        ];

        $body = $this->request(self::URI_AUTH_USER_ADD, $params);

        return $body;
    }
755429
public function setUser(\Core\Entity\User $user = null)
    {
        $this->user = $user;

        return $this;
    }
548188
public function addUser($userId)
    {
        if (true === is_numeric($userId) && false === in_array($userId, $this->users)) {
            $this->users[] = (int)$userId;
        }
        return $this;
    }
686761
public function addUser(User $user): bool
	{
		if(!$this->isPersisted)
		{
			throw new LogicException('You can only add a user to a group that exist in the database.');
		}

		if(!$user->isPersisted())
		{
			throw new LogicException('You can only add a user that exist in the database to a group.');
		}

		return $this->users()->link($user);
	}
459635
public function createUser(User $user, $password)
    {
        $request = $user->toJson();
        $request['password'] = $password;
        $response = $this->client->post('/v2/user', $request);

        return $response['id'];
    }
1363794
public function addUser(ServerUser $user)
    {
        if ($this->users->contains($user) === false) {
            $user->setServer($this);
            $this->users->add($user);
        }

        return $this;
    }
779260
public function updateVote($vote)
    {

        $out = [
            "yes" => $vote->getYes(),
            "no" => $vote->getNo(),
        ];

        $this->updateValue($this->allPlayers, "VoteUpdater", Builder::getArray($out, true));
    }
121439
public function updatePassword(User $user, $password) : User
    {
        $user->updatePassword($password);
        $this->repository->add($user);

        return $user;
    }
46772
public function addUser($user)
    {
        $this->configSource->set('auth-password/' . $user->getUsername(), $user->values());

        return $this;
    }
533753
public function add( models\VPN\Server\User $user){
        $rest = $this->getService( self::API_VPN_USER);
        $rest->POST( $user);

        return $rest->getResult( models\VPN\Server\User::class);
    }
922946
def addVote(self, commit: Commit, voter: str) -> None:
        
        super()._add_msg(commit, voter)