Take the tour ×  I want to assign the value from a peopleeditor
control to a user field in C#.  I have a resolved entity in the
people editor, but when passing the SPUserId into the
SPFieldUserValue constructor along with the RootWeb (or even
current web), the uservalue is null (i.e. it can't find the
user). Is there a way of searching the active directory/the same
place the people editor searches for this user as opposed to a
SharePoint web?  Thanks a lot.  share|improve this question add
comment  2 Answers  up vote 1 down vote accepted  What you are
probably missing is a call to EnsureUser, which will create the
user if they haven't already visited the website; they don't
exist within SharePoint if they haven't been to the website or
had permissions explicitly set. http://msdn.microsoft.com/en-
us/library/microsoft.sharepoint.spweb.ensureuser.aspx
share|improve this answer Thanks a lot... –  DeeMac Sep 20 '12
at 16:08 add comment  You need to look to the site instead of
the web to find users. Users and grou