Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Simon Yohannes 57 posts 184 karma points
    1 week ago
    Simon Yohannes
    0

    writerId is the id of the previous person who edited the content in ContentService.Saving event

    hi guys and gals,

    i need to know who edited the content in the ContentService.Saving event but it's always got the id of the previous person who made the edit in the WriterId property of the SaveEventArgs content.

    is this a bug?

    thanks, Simon

  • Shaishav Karnani from digitallymedia.com 280 posts 1268 karma points
    1 week ago
    Shaishav Karnani from digitallymedia.com
    0

    Hi Simon,

    How are you picking up WriterID. Can you share the code please?

    Cheers,

    Shaishav

  • Simon Yohannes 57 posts 184 karma points
    1 week ago
    Simon Yohannes
    0

    hi Shaishav, here's how i get writer id:

    private void ContentService_Saving(Umbraco.Core.Services.IContentService sender, Umbraco.Core.Events.SaveEventArgs<IContent> e)
    {
           foreach (var content in e.SavedEntities) {
                var writerId = content.WriterId;
           }
    }
    

    thanks Si

Please Sign in or register to post replies

Write your reply to:

Draft