Update database query after schema changes
The Wiki Replicas have had schema changes:
- *_user and *_user_text fields were dropped.
- there is a new 'actor' table
Here, we retrieve the actor id from old_image and image,
do an additional join on the actor table to get the user_id,
which we need in order to get the user_registration.