Technical background
In T368151 we added a central table, cuci_user, to keep track of which wikis have edited by a given account.
The table records the central ID of the user, wiki and timestamp of the latest action (code).
CheckUser already updates the relevant table whenever an action is saved, via RecentChangeSaveHandler::onRecentChange_save or other handlers (for private events). This is done via service methods in CheckUserInsert.
What needs doing
The service and hook handler can be adapted to update cuci_user. Note that we should follow the relevant advice listed in T368151#9993273. Notably:
- Do not try to update the timestamp if it was within at least the last minute (to reduce calls)
- This could also include only performing the update 1/10 times if the timestamp is within the last hour
- Do not store data for bot accounts
- Ensure that the writes occur via a job
- Exclude actions on WMCS IP addresses
- Just update the timestamp if a row for the same central ID/wiki already exists in the table
- Refer to the cuci_wiki_map table for the ID of the wiki