Get SPUser fom Author field RRS feed

  • Question

  • Hi, I have an item that I want to get the Author as a SPUser. How can I do it the quickest way?


    Tuesday, December 4, 2012 4:01 PM


  • SPFieldUserValue userValue = new SPFieldUserValue(web, item[SPBuiltInFieldId.Author].ToString());
    SPUser author = userValue.User;

    (where item is your SPListItem en web the SPWeb)

    • Marked as answer by renatois Wednesday, December 5, 2012 8:35 AM
    Tuesday, December 4, 2012 4:52 PM

All replies