Import user IDs for file revisions
Closed, InvalidPublic


Global user ids are a pretty recent thing on mediawiki. Therefore, user names have often been used as a unique identifier. However, now that global user ids exist, they should be used!

When file revisions are copied to Commons, the users mentioned in these file revisions should be defined not only by name, but also by the global user ID.

Lea_WMDE created this task.Apr 20 2017, 8:29 PM
Addshore claimed this task.
Restricted Application added a project: User-Addshore. · View Herald TranscriptMay 10 2017, 1:25 PM
Addshore moved this task from Backlog to Next on the User-Addshore board.May 11 2017, 8:33 AM

I need to double check this before closing but I am 99% sure that we dont need to do any action here.
The ids should be correctly imported (as the local user) but this of course did not happen on the test site as there are no local users!

Addshore closed this task as Invalid.Jun 12 2017, 2:43 PM

Yup, so the wikirevisions are created by doing

$revision->setUsername( $textRevision->getField( 'user' ) );

and the import code in WikiRevision then does

$user = $this->getUserObj() ?: User::newFromName( $this->getUser() );

Which will get the user object for the local wiki and import it under than user.

Addshore moved this task from Next to Done on the User-Addshore board.