Page MenuHomePhabricator

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.

Event Timeline

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!

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.