I have a scenario where i need to know who has initiated a publish for a component/page. Once that user is known, I need to put that user's name into my component and then it has to go for publishing. What would be the best way to do that?
I came across
PublishEngine.GetPublishInfo method, which would be helpful in giving me the required values. Can anyone explain me whether this
PublishEngine would be active/available in event system? or usually when would it be available? Can we use it in templates as well?
Addition: We need this because, once the component/page is published, our application would be consuming this component/page and would like to know the user who has published so that we can send the information on mail to him that publishing is successful but something went wrong in application so no need to publish again if he doesn't see his changes.