I see in the API there is a way to grab the UpdateDate field. Is there a way to determine WHO made the last update to a particular content node? In other words, the user ID of the person that last edited a particular node?
Here’s some of the code I’m attempting to use:
Document[] releaseDocs = Document.GetRootDocuments();
User currentUser = User.GetCurrent();
foreach (var doc in releaseDocs)
{
docPermissions = currentUser.GetPermissions(doc.Path);
if ((docPermissions.Contains("F")) && (docPermissions.Contains("U")))
{
if (doc.HasPendingChanges())
{
if (doc.ParentId > -1)
{
lblPageContent += doc.Writer.Name;
}
}
}
}
I did some more research on this and, while writerID and writerName are supposed to store the last editor, there appears to be a bug in Umbraco. Their support suggested creating a hidden field that updates with the editor user data, so that’s my temporary work around for now.