Deactivates the users with the given ids.

@param {Array} userIds The ids of the users to deactivate.
@return {Promise} A Promise for the Passport call.
966351
function(userIds) {
    return new Promise((resolve, reject) => {
      this._start()
          .uri('/api/user/bulk')
          .urlParameter('userId', userIds)
          .delete()
          .go(this._responseHandler(resolve, reject));
    });
  }
981310
def UsersDelete (self, user_id):
        
        if self.__SenseApiCall__('/users/{user_id}.json'.format(user_id = user_id), 'DELETE'):
            return True
        else:
            self.__error__ = "api call unsuccessful"
            return False
826792
public static function delete_users($userids) {
        global $CFG, $DB, $USER;
        require_once($CFG->dirroot."/user/lib.php");

        // Ensure the current user is allowed to run this function.
        $context = context_system::instance();
        require_capability('moodle/user:delete', $context);
        self::validate_context($context);

        $params = self::validate_parameters(self::delete_users_parameters(), array('userids' => $userids));

        $transaction = $DB->start_delegated_transaction();

        foreach ($params['userids'] as $userid) {
            $user = $DB->get_record('user', array('id' => $userid, 'deleted' => 0), '*', MUST_EXIST);
            // Must not allow deleting of admins or self!!!
            if (is_siteadmin($user)) {
                throw new moodle_exception('useradminodelete', 'error');
            }
            if ($USER->id == $user->id) {
                throw new moodle_exception('usernotdeletederror', 'error');
            }
            user_delete_user($user);
        }

        $transaction->allow_commit();

        return null;
    }
872157
function (ids, success, error) {
        if (!Array.isArray(ids)) {
            ids = [ids];
        }
        return execPromise(success, error, "GeofencePlugin", "remove", ids);
    }
245796
def GroupsUsersDelete(self, group_id, user_id):
        
        if self.__SenseApiCall__('/groups/{group_id}/users/{user_id}.json'.format(group_id = group_id, user_id = user_id), 'DELETE'):
            return True
        else:
            self.__error__ = "api call unsuccessful"
            return False
990722
def delete_user(self, user_id, **kwargs):
        
        return DeleteUser(settings=self.settings, **kwargs).call(user_id=user_id, **kwargs)
152941
protected function forceLogoutForUserById($userId) {
		$this->deleteRememberDirectiveForUserById($userId);
		$this->db->exec(
			'UPDATE ' . $this->makeTableName('users') . ' SET force_logout = force_logout + 1 WHERE id = ?',
			[ $userId ]
		);
	}
528276
public static function delete_conversations_by_id($userid, array $conversationids) {
        global $CFG;

        // Check if private messaging between users is allowed.
        if (empty($CFG->messaging)) {
            throw new moodle_exception('disabled', 'message');
        }

        // Validate params.
        $params = [
            'userid' => $userid,
            'conversationids' => $conversationids,
        ];
        $params = self::validate_parameters(self::delete_conversations_by_id_parameters(), $params);

        // Validate context.
        $context = context_system::instance();
        self::validate_context($context);

        $user = core_user::get_user($params['userid'], '*', MUST_EXIST);
        core_user::require_active_user($user);

        foreach ($params['conversationids'] as $conversationid) {
            if (\core_message\api::can_delete_conversation($user->id, $conversationid)) {
                \core_message\api::delete_conversation_by_id($user->id, $conversationid);
            } else {
                throw new moodle_exception("You do not have permission to delete the conversation '$conversationid'");
            }
        }

        return [];
    }
545919
function deleteUser(options) {
            return models.Base.transaction((t) => {
                options.transacting = t;

                return Promise.all([
                    models.Accesstoken.destroyByUser(options),
                    models.Refreshtoken.destroyByUser(options),
                    models.Post.destroyByAuthor(options)
                ]).then(() => {
                    return models.User.destroy(options);
                }).return(null);
            }).catch((err) => {
                return Promise.reject(new common.errors.NoPermissionError({
                    err: err
                }));
            });
        }
882285
protected static function delete_user_data($userid) {
        global $DB;
        $DB->delete_records_select('messageinbound_messagelist', 'userid = :userid', ['userid' => $userid]);
        \core_userkey\privacy\provider::delete_userkeys('messageinbound_handler', $userid);
    }
155451
public function activate($id)
    {
        $user = $this->findById($id);

        try
        {
            if ( $user->attemptActivation($user->getActivationCode()) )
            {
                $this->event->fire('users.activate',array($user));
                return true;
            }
        }
        catch (UserAlreadyActivatedException $e){}


        return false;
    }
427085
public static function can_create_data_deletion_request_for_children(int $userid, int $requesterid = null): bool {
        global $USER;
        $requesterid = $requesterid ?: $USER->id;
        return has_capability('tool/dataprivacy:makedatadeletionrequestsforchildren', \context_user::instance($userid),
            $requesterid);
    }
526455
public function deleteById($userId, array $queryParams = [])
    {
        $response = $this->api->users()->deleteById($userId, $queryParams);

        return new BaseResponse($response);
    }
537182
def users_deactivate(user):
    """"""
    user_obj = _datastore.get_user(user)
    if user_obj is None:
        raise click.UsageError('ERROR: User not found.')
    if _datastore.deactivate_user(user_obj):
        click.secho('User "{0}" has been deactivated.'.format(user),
                    fg='green')
    else:
        click.secho('User "{0}" was already deactivated.'.format(user),
                    fg='yellow')
1056839
public void setUserIds(java.util.Collection<String> userIds) {
        if (userIds == null) {
            this.userIds = null;
            return;
        }

        this.userIds = new com.amazonaws.internal.SdkInternalList<String>(userIds);
    }
103474
public DeleteRequestBuilder<T,ID> delete(List<ID> ids)
    {
        return new DeleteRequestBuilder<T, ID>(version,type,entityName, (ID[]) ids.toArray(new Serializable[ids.size()]));
    }
701124
public boolean removeUserById(int id) {
		Iterator<User> it = users.iterator();
		while (it.hasNext())
			if (it.next().getId() == id) {
				it.remove();
				return true;
			}
		return false;
	}