function userDisconnected(user, client) {
  logger.debug(`User ${user.firstname} connected in websocket`);
  if (!this.connections[user.id]) {
    this.connections[user.id] = [];
  }
  const connectionIndex = this.connections[user.id].findIndex((elem) => elem.client === client);

  if (connectionIndex !== -1) {
    this.connections[user.id].splice(connectionIndex, 1);
  }

  return null;
}
@description When a user is disconnected.
@param {object} user - User Object.
@param {object} client - Websocket client.
@returns {null} Return when finished.
@example
userDisconnected(user, ws);