I am trying to get SharePoint to create an SPUser
for a disabled active directory account.
The reason for this is that I am archiving items across site collections. As the items are copied I am creating the users on the other site collection so that it can still have the appropriate "Created By"/"Modified By". The problem I'm having is that some of the users are long gone and their accounts are now disabled so the SPList.EnsureUser()
function does not work. My current work around for this is to create an SPGroup
with the users name as a place holder.
The only other person that I have seen ask this question is here: http://social.technet.microsoft.com/Forums/sharepoint/en-US/ba184fb0-a22a-4d4a-8734-5b7f14d71c85/sharepoint-api-add-user-in-sharepoint-which-is-disabled-on-active-directory-but-in-case-of-ui-its in which case the answer just re-stated that ensureUser only works on active accounts and gave a dead link.
Is it possible to create an SPUser for the disabled account or am I chasing a ghost?