Copied to clipboard

Flag this post as spam?

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


  • Taras 30 posts 151 karma points
    Jun 13, 2014 @ 12:41
    Taras
    0

    Implement custom logic for Member.BeforeDelete Or Member.AfterDelete

    I need khow member's deleted Email.

    I tried to do something like this:

    public class RegisterEvents : IApplicationEventHandler
    {
        public void OnApplicationInitialized(UmbracoApplicationBase httpApplication, ApplicationContext applicationContext)
        {
        }
    
        public void OnApplicationStarting(UmbracoApplicationBase httpApplication, ApplicationContext applicationContext)
        {            
            Member.BeforeDelete += new Member.DeleteEventHandler( Member_BeforeDelete);
        }
    
        public void OnApplicationStarted(UmbracoApplicationBase httpApplication, ApplicationContext applicationContext)
        {
        }
    
    
        void Member_BeforeDelete(Member sender, DeleteEventArgs e)
        {
            //Need get email
        }
    }
    

    But look like Member_BeforeDelete handler wasn't being called.(For check I put breakpoints in this handler). Same situation for Member.AfterDelete.

    How can I get member's deleted Email?

    Thanks.

  • Charles Afford 1163 posts 1709 karma points
    Jun 16, 2014 @ 20:59
    Charles Afford
    0

    Hi when you say you need to know members delete email, what do you mean by this?

    Thanks,

    Charlie

  • Taras 30 posts 151 karma points
    Jun 20, 2014 @ 20:40
    Taras
    0

    Charles Afford, sorry for my late answer.

    In general I need all information about user which was deleted(id, email ...etc.).

    But handler, which I described, doesn't work. Please give me advice, how I must rewrite this handler.

    Sequence of steps which I tried to do:

    1. Delete member on umbraco admin side(members tab)
    2. Catch in handler information about user which was deleted.
    3. Do something with obtained user's data(for example, send some message to email)

    Thanks.

  • Bex 444 posts 555 karma points
    Oct 14, 2014 @ 14:27
    Bex
    0

    Did you ever manage to fix this? I can't get the handlers to fire either.

  • Charles Afford 1163 posts 1709 karma points
    Oct 19, 2014 @ 15:52
Please Sign in or register to post replies

Write your reply to:

Draft