SharePoint User From ID

Finding a user object from a user id.

using (SPSite site = new SPSite("http://localhost/")){ 
    using (SPWeb web = site.AllWebs[0])  {     
    
SPUserCollection userCollect =  web.AllUsers;
     SPUser user = userCollect.GetByID(3);
 
   }
}

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Add comment


(Will show your Gravatar icon)  

  Country flag

biuquote
  • Comment
  • Preview
Loading



 

Dilbert of the day