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 58 posts 188 karma points
    Sep 10, 2019 @ 08:46
    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 354 posts 1638 karma points
    Sep 10, 2019 @ 16:18
    Shaishav Karnani from digitallymedia.com
    0

    Hi Simon,

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

    Cheers,

    Shaishav

  • Simon Yohannes 58 posts 188 karma points
    Sep 10, 2019 @ 18:08
    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