문제

As title says, I have access to the current listitem - and it's easy enough to get the author/created by name - but how do I retrieve the e-mail address of the author in C# from the object model?

Thanks.

도움이 되었습니까?

해결책

You can get the SPUser from a SPFieldUserValue object:

SPFieldUserValue userValue = 
    new SPFieldUserValue(web, item[SPBuiltInFieldId.Author].ToString());
SPUser user = userValue.User;
string email = user.Email;
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top