Is there a way to force the user to keep the same ID when they are migrated?

Comments

torgospizza’s picture

I was able to force uid->uid relationship by editing the user.inc file as such:

// Changed addSimpleMappings line to include the 'uid' field.
$this->addSimpleMappings(array('uid', 'pass', 'mail', 'created', 'access', 'login', 'status', 'timezone', 'language', 'picture'));
...
// Added the 'is_new' field mapping 
$this->addFieldMapping('is_new')->defaultValue(TRUE);

Note that you'd need to undo these changes if you were updating previously migrated content/users.

torgospizza’s picture

Also a quick note, make sure under Configuration > Account Settings > Account activation tab, you have notifications turned off! I accidentally had it checked and sent out a handful of emails. Luckily for testing I always keep my "--limit" low, so it only went out to a couple admins, as opposed to 1000 actual users! :)

dwkitchen’s picture

Status: Active » Needs review

Thanks torgosPizza,

Will remember that, our sites got over 20,000 users!