async replaceUser(request) {
    const id = request.getId();
    const content = request.getBody();
    const profileIds = request.getBodyArray("profileIds");
    const userId = request.getKuid();

    const user = await this.ask(
      "core:security:user:replace",
      id,
      profileIds,
      content,
      { refresh: request.getRefresh("wait_for"), userId },
    );

    global.kuzzle.log.info(
      `[SECURITY] ${SecurityController.userOrSdk(userId)} applied action "${
        request.input.action
      }" on user "${id}."`,
    );

    return formatProcessing.serializeUser(user);
  }
Replaces an existing User

@param {Request} request
@returns {Promise<Object>}