I have backup-restored a site collection. In the new site collection we use Claims based authentcation.
Now it looks like all the users from the old web is also restored on the new site (which probably is a 'feature', not a bug).
The problem is that in the new site/farm, the users exists but with claims based accounts, so the usernames will have i:0#.w| in front of the username.
What's a bigger issue is that SharePoint now creates two user objects in the site, one with username like DOMAIN\Username, and one with i:0#.w|DOMAIN\Username. Because of this, the users will have different ids in the same site.
So I have a list with a user lookup field. When I issue a CAML Query on this list based on the current user, I could get no results if the id for the user in the list is not the same as for the current user.
How can I fix this? Remove all users which doesn't use claims auth from the site through powershell?