Thursday, February 24, 2011

How to get SharePoint User by User Id in C#

This is simple.

SPSite site = new SPSite(http://server);
SPWeb myweb = site.OpenWeb();
SPUser found = myweb.AllUsers.GetByID(1);

Post a Comment