Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi
I am using umbraco 6.2.1 and I need to do something when a user deletes a member in the backend.
I have set up a handler
public class Events : IApplicationEventHandler { public void OnApplicationInitialized(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext) { Member.AfterDelete += Member_AfterDelete; } void Member_AfterDelete(Member sender, umbraco.cms.businesslogic.DeleteEventArgs e) { int id= sender.Id; } }
It seems to initialise my method but my breakpoint never breaks when I delete a member.
Is there another way of doing this or am I missing something.
Bex
worked it out! You need
public void OnApplicationInitialized(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext) { MemberService.Deleted += MemberService_Deleted; } void MemberService_Deleted(IMemberService sender, Umbraco.Core.Events.DeleteEventArgs<Umbraco.Core.Models.IMember> e) { var member= e.DeletedEntities.First(); int id = member.Id; }
Thanks for the post Bex that's usefull :).
Charlie.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Member_AfterDelete not firing
Hi
I am using umbraco 6.2.1 and I need to do something when a user deletes a member in the backend.
I have set up a handler
It seems to initialise my method but my breakpoint never breaks when I delete a member.
Is there another way of doing this or am I missing something.
Bex
worked it out! You need
Thanks for the post Bex that's usefull :).
Charlie.
is working on a reply...