When sharepoint is removing a user from groups
$user = Get-SPUser -Web http://xxx -Identity “i:0#.w|ddd\xxx”
Move-SPUser -Identity $user -NewAlias “i:0#.w|ddd\xxx” -IgnoreSID
stsadm -o migrateuser -oldlogin ddd\xxx-newlogin “i:0#.w|ddd\xxx” -ignoresidhistory