The AfterSave method only gets called when one of the (three) membership properties has changed. This means that when I add a custom field to the Member Type and change only that field, the Member object (including the custom field) does get saved, but no event is triggered.
Looking around the Umbraco code I noticed that the FireAfterSave gets called from the Save() method, but in my use case the Save() method only gets called by the UpdateUser() method on the UmbracoMembershipProvider which in turn only gets called if the MemberController had determined that the MembershipUser has changed via the HasMembershipUserChanged() method.
Unfortunatly my custom field is not part of the MembershipUser and thus does not trigger the event.
Am I doing something wrong here or is there just a bug in Umbraco that prevents the BeforeSave/AfterSave method from fireing on changes of my custom property?
7.1 (currently in beta but scheduled for RC later this week) brings with it new API's for working with members. This will apparently fix a lot of issues with the legacy systems.
Member.BeforeSave/AfterSave events do not fire
After hooking up the BeforeSave or AfterSave events on the Member object like so:
The AfterSave method only gets called when one of the (three) membership properties has changed. This means that when I add a custom field to the Member Type and change only that field, the Member object (including the custom field) does get saved, but no event is triggered.
Looking around the Umbraco code I noticed that the FireAfterSave gets called from the Save() method, but in my use case the Save() method only gets called by the UpdateUser() method on the UmbracoMembershipProvider which in turn only gets called if the MemberController had determined that the MembershipUser has changed via the HasMembershipUserChanged() method.
Unfortunatly my custom field is not part of the MembershipUser and thus does not trigger the event.
Am I doing something wrong here or is there just a bug in Umbraco that prevents the BeforeSave/AfterSave method from fireing on changes of my custom property?
7.1 (currently in beta but scheduled for RC later this week) brings with it new API's for working with members. This will apparently fix a lot of issues with the legacy systems.
Thanks Chad, I'll look into it once we've upgraded to 7.1
Is there any documentation on the new MemberService?
is working on a reply...