sharepoint code to get SPUser from username string
String UserName= “Srikanth Kancharla”;
SPUser User= SPWeb.EnsureUser(UserName);
SPWeb.EnsureUser():
This mehtod will checks whether the specified user 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