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


Related Gerrit Patches:
mediawiki/core : masterAPI should allow querying user contribs by userid
mediawiki/core : masterUpdate date

Event Timeline

TTO created this task.Oct 2 2015, 7:05 AM
TTO raised the priority of this task from to Medium.
TTO updated the task description. (Show Details)
TTO added a project: MediaWiki-API.
TTO moved this task from Unsorted to Needs Code on the MediaWiki-API board.
TTO added subscribers: Ricordisamoa, Aklapper, TTO.
Yuer3677 removed a subscriber: Yuer3677.Oct 5 2015, 3:56 AM
TTO updated the task description. (Show Details)Nov 8 2016, 12:50 AM

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 ?

Anomie added a subscriber: Anomie.Nov 21 2016, 4:45 PM

It would be essential to keep both.

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

Halfak added a comment.EditedNov 29 2016, 10:15 PM

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

Could someone review the last patch please :) ?

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

Anomie closed this task as Resolved.Jan 6 2017, 2:26 PM

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