Copied to clipboard

Flag this post as spam?

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


  • Alexander 23 posts 73 karma points
    Feb 06, 2014 @ 19:03
    Alexander
    0

    Member.BeforeDelete doesn't work

    Hi everyone!

     

    I have to events for members BeforeSave and BeforeDelete.

    BeforeSave works fine and triggered in appropriate situations.

    I have database dependencies for my members, so before delete member I should clear some data first, but BeforeDelete event doesn't triggered at all.

    Can anybody help me with it?

     

  • Nenad Kosanovic 18 posts 56 karma points
    Apr 15, 2014 @ 15:18
    Nenad Kosanovic
    0

    I have the sam problem.

     

    Publihs event is forking, but before delete no?

     
    ublic class DeleteMemberHandler : IApplicationEventHandler
        {
            public void OnApplicationStarted(UmbracoApplicationBase httpApplicationBase, Umbraco.Core.ApplicationContext applicationContext) {
                ContentService.Publishing += CustomPublishingEventHandler;            
                Member.BeforeDelete += BeforeDeleteHandler;
                
            }
            public void OnApplicationStarting(UmbracoApplicationBase httpApplicationBase, Umbraco.Core.ApplicationContext applicationContext) { }
            public void OnApplicationInitialized(UmbracoApplicationBase httpApplicationBase, Umbraco.Core.ApplicationContext applicationContext) { }
     
            
            private void CustomPublishingEventHandler(IPublishingStrategy sender, Umbraco.Core.Events.PublishEventArgs<Umbraco.Core.Models.IContent> e)
            {
                e.Cancel = true;            
            }
     
            private void BeforeDeleteHandler(Member sender, DeleteEventArgs e)
            {
                e.Cancel = true;
            }
        }

  • Nenad Kosanovic 18 posts 56 karma points
    May 06, 2014 @ 11:07
    Nenad Kosanovic
    0

    Can someone help with this?

Please Sign in or register to post replies

Write your reply to:

Draft