Page MenuHomePhabricator

API should allow querying user contribs by userid
Closed, ResolvedPublic


Add a ucuserid parameter to be used instead of ucuser.

Requested on the API mailing list.

@Halfak also mentioned the following examples:

  • list=usercontribs allows for ucusers -- should have something like ucuserids
  • prop=revisions allows for rvuser and rvexcludeuser -- should have something like rvuserid and rvexcludeuserid
  • list=users allows for ususers -- should have something like ususerids
  • meta=globaluserinfo allows for guiuser -- should have something like guiuserid that takes a global user ID

Event Timeline

TTO raised the priority of this task from to Medium.
TTO updated the task description. (Show Details)
TTO added a project: MediaWiki-Action-API.
TTO moved this task from Unsorted to Needs Code on the MediaWiki-Action-API board.
TTO added subscribers: Ricordisamoa, Aklapper, TTO.

All that should be done is to modify the code of the file ApiQueryUserContributions.php to take ucuserid instead of ucuser names ?
Or it is better to keep both ?

It would be essential to keep both.

I started working on this task.
I have one question, does anonymous users have userid ?

They do not -- not exactly. But the database generally records a rev_user value of 0. Should we allow querying of anons with rev_user=0?

For the moment I will skip anonymous users because they do not have a userid. It is always 0 so I cannot tell who is who.

Change 324338 had a related patch set uploaded (by Blackspirit96):
API should allow querying user contribs by userid

I made a patch for code review, but I believe I messed up with the commit messages, sorry!

Change 328710 had a related patch set uploaded (by Blackspirit96):
Update date

Change 328710 abandoned by Blackspirit96:
Update date


Some screenshots from the latest patch

Selection_034.png (593×1 px, 67 KB)

Selection_035.png (305×818 px, 46 KB)

Selection_037.png (308×1 px, 50 KB)

Could someone review the last patch please :) ?

Change 324338 merged by jenkins-bot:
API should allow querying user contribs by userid

The original report here is now resolved. I've created subtasks for the tangentially-related bits that weren't done here.