Programmatically deleting user from All People
سؤال
i am able to remove the user from site collection using in this way:-
SPWeb.SiteUsers.Remove("providername:" + this.txtOldName.Text);
but found the same user existing in All People how to remove user from All People programmatically
المحلول
i fixed the issue using
oldUser = oWeb.SiteUsers["providername:" + this.txtOldName.Text];
int id = oldUser.ID;
oWeb.SiteUsers.RemoveByID(id);
oWeb is the object of SPWeb
لا تنتمي إلى sharepoint.stackexchange