function userConnected(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].push({
      user,
      client,
    });
  }

  // Send a message to the frontend to tell it's connected
  this.sendMessageUser({
    type: WEBSOCKET_MESSAGE_TYPES.AUTHENTICATION.CONNECTED,
    payload: {},
    userId: user.id,
  });

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