Added check that the user_id and event_id are valid