Srikanth's SharePoint Diary
Sunday, July 1, 2012
How to get SPUser object from String
String UserName= “Srikanth Kancharla”;
SPUser User= SPWeb.EnsureUser(UserName);
SPWeb.EnsureUser():
Checks whether the specified logon name belongs to a valid user of the website, and if the logon name does not already exist, adds it to the website.
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment