How to get SPUser from list item, SharePoint list item get user, how to get created, modified, Author or Editor from sharepoint list, how to get LoginName or Email of User from list,
Well there is another way to get Web. EnsureUser(“User”); it returns SPUser object as well it adds user in site directly if do not already that web user, another way to get it write a function that return SPUser object,
*Assuming that you are aware how to get SPWeb and List then List item,
SPUser oUserSubmittedBy = GetSPUser(oItem, “fieldDisplay Name”);
Here is the function body.
Code:
And once you get object you can get Name, email and login name
oUserSubmittedBy.LoginName
oUserSubmittedBy.Name
oUserSubmittedBy.Email…. etc..
--
Regards,
Praveen Pandit