Manual:CleanupUsersWithNoId.php

Details
cleanupUsersWithNoId.php is a maint-scripts>Special:MyLanguage/Manual:Maintenance scripts|maintenance script that cleans up tables that have valid usernames with no user ID. It should once be run in wikis that contain imported revisions or CentralAuth global blocks.

Example
This will only clean up the revision table.