This creates a set before requesting users from the database. This prevents doing the same check for the same user multiple times and also prevents concurrent modifications of the event list.