Pergunta

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

Foi útil?

Solução

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

Licenciado em: CC-BY-SA com atribuição
Não afiliado a sharepoint.stackexchange
scroll top