Sets the deafened state of the user with the given id.

@param userId The id of the user.
@param deafened Whether the user with the given id is deafened or not.
428905
public void setDeafened(long userId, boolean deafened) {
        if (deafened) {
            this.deafened.add(userId);
        } else {
            this.deafened.remove(userId);
        }
    }
870737
func (s *DescribeUserOutput) SetUserId(v string) *DescribeUserOutput {
	s.UserId = &v
	return s
}
812811
public void setForcedUser(int contextId, User user) {
		if (user != null)
			this.contextForcedUsersMap.put(contextId, user);
		else
			this.contextForcedUsersMap.remove(contextId);
		this.updateForcedUserModeToggleButtonState();
	}
1142702
public void setReadAccess(String userId, boolean allowed) {
    if (StringUtil.isEmpty(userId)) {
      throw new IllegalArgumentException("cannot setRead/WriteAccess for null userId");
    }
    boolean writePermission = getWriteAccess(userId);
    setPermissionsIfNonEmpty(userId, allowed, writePermission);
  }
1020272
public void setReceiverId(byte[] receiverId) {
    if (receiverId == null) {
      throw new RuntimeException("Receiver ID cannot be null.");
    }
    if (receiverId.length != DEVICE_ID_SIZE) {
      throw new RuntimeException(
          String.format("Receiver ID must be %d bytes long.",
              Integer.valueOf(DEVICE_ID_SIZE)));
    }
    this.receiverId = receiverId;
  }
568429
public function setAssignments($items, $userId)
    {
        if (is_string($items)) {
            $items = explode(',', $items);
        }
        foreach ($items as $item) {
            $this->setAssignment($item, $userId);
        }
    }
893030
public void setId(String id) {
        logger.entering(id);
        this.id = id;
        logger.exiting();
    }
1022190
def update_voice_state(data)
      user_id = data['user_id'].to_i

      if data['channel_id']
        unless @voice_states[user_id]
          # Create a new voice state for the user
          @voice_states[user_id] = VoiceState.new(user_id)
        end

        # Update the existing voice state (or the one we just created)
        channel = @channels_by_id[data['channel_id'].to_i]
        @voice_states[user_id].update(
          channel,
          data['mute'],
          data['deaf'],
          data['self_mute'],
          data['self_deaf']
        )
      else
        # The user is not in a voice channel anymore, so delete its voice state
        @voice_states.delete(user_id)
      end
    end
1083719
public void addCustomNotificationRecipient(String userID) {
        BoxUser user = new BoxUser(null, userID);
        this.customNotificationRecipients.add(user.new Info());

    }
1031374
public void setUserList(java.util.Collection<User> userList) {
        if (userList == null) {
            this.userList = null;
            return;
        }

        this.userList = new java.util.ArrayList<User>(userList);
    }
203360
public static function is_conversation_muted(int $userid, int $conversationid) : bool {
        global $DB;

        return $DB->record_exists('message_conversation_actions',
            [
                'userid' => $userid,
                'conversationid' => $conversationid,
                'action' => self::CONVERSATION_ACTION_MUTED
            ]
        );
    }
1142639
public void setForcedUser(int contextId, int userId) throws IllegalStateException {
		User user = getUserManagementExtension().getContextUserAuthManager(contextId).getUserById(userId);
		if (user == null)
			throw new IllegalStateException("No user matching the provided id was found.");
		setForcedUser(contextId, user);
	}
583741
protected void setId(String id) {
		if (!StringUtils.hasText(id)) {
			id = null;
		}
		this.id = id;
	}
1360552
public void setUser(String user)
  {
    if (tc.isEntryEnabled())
      SibTr.entry(tc, "setUser", user);

    this.user = user;

    if (tc.isEntryEnabled())
      SibTr.exit(tc, "setUser");
  }
171935
@Override
	public final void setUUID(UUID id) {
		final UUID oldId = getUUID();
		if ((oldId != null && !oldId.equals(id)) || (oldId == null && id != null)) {
			super.setUUID(oldId);
			fireElementChanged();
		}
	}
307088
func (s *GetUserSettingsInput) SetUserId(v string) *GetUserSettingsInput {
	s.UserId = &v
	return s
}
873975
void setId(long id)
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "setId", new Long(id));

        _consumerId = id;

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "setId");
    }