This project is read-only.

SPWeb.Users Vs SPWeb.SiteUsers

Jan 5, 2011 at 10:34 AM


Thanks for the utility, it's saved me quite a bit of time.

I've noticed after running the utility, orphand users still exist in the "All Users" list. I expect this is due to you iterating through the site permissions using SPWeb.Users. Is there any reason why you don't get the users from SPWeb.SiteUsers? Using SiteUsers would mean you delete users from the "All Users" list as well.

Jan 21, 2011 at 5:21 PM

Back when I created this utility, I was still learning how to use my c# skills within SharePoint. I didn't realize that I could just delete the users from All Users, which would remove the same users from everything in the collection. I never went back to change the code because I got so busy working on other projects for my job, and haven't thought much about it in a while. It would be a good idea to go back in and make those changes soon though.