If a global user is not attached to the local wiki, CampaignsCentralUserLookup::getLocalUser() will throw an exception, and the user will not appear in several places (e.g., list of participants). I think most if not all places do not actually need the user to be attached, so we should try and avoid using getLocalUser whenever possible.
Testing notes
This task involves a large refactoring of the concept of user inside the extension, and there's no specific thing that might have broken. So I don't have specific notes, except for: make sure that everything is still functional. Anything that uses the concept of user (that is, pretty much everything) should be tested ideally; both when it's about other users (e.g. lists of participants/organizers) or the current user (e.g., permission checks). One thing that is particularly important to test is the behaviour with unattached users. To test that, you may perform some actions on a wiki (e.g., create a registration, register as a participant), then log out, go to a wiki where your account does not exist (you can use Special:CentralAuth to verify that), and see how your username appears when looking at registration details on that wiki (e.g., is your username shown at all? Also, the expected behaviour for now is that the link to your account in the "more details" dialog will be red if the account does not exist locally).
Also, as part of this task we should update the documentation of the following endpoints:
- List events by organizer: now takes a global user ID as parameter
- List events by participant: now takes a global user ID as parameter
- List organizers of an event: now returns global user IDs
- List participants of an event: now returns global user IDs
Please holler at me if those are not updated by the time this task reaches the QA column.





