سؤال

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

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى sharepoint.stackexchange
scroll top