I'm using Umbraco version 4.7.2 and writing an add on that keeps the list of members in sync with a list on MailChimp.
As part of this I need to be able to update MailChimp when a member's email address changes. To update MailChimp I need to know both the old email address and the new email address. I was hoping to get the old email address from the database in a handler for Member.BeforeSave, but it's already changed in the database by the time the event handler is fired. I presume this is because it's updated using the ASP.Net membership code which doesn't fire this event.
Is there an event I can hook into to do this? Or should I get the old email in some other way?
Event for Member email update
I'm using Umbraco version 4.7.2 and writing an add on that keeps the list of members in sync with a list on MailChimp.
As part of this I need to be able to update MailChimp when a member's email address changes. To update MailChimp I need to know both the old email address and the new email address. I was hoping to get the old email address from the database in a handler for Member.BeforeSave, but it's already changed in the database by the time the event handler is fired. I presume this is because it's updated using the ASP.Net membership code which doesn't fire this event.
Is there an event I can hook into to do this? Or should I get the old email in some other way?
Hello Alasdiar
i dont think you able to do that, as i rember it the data is allready updatet hveh before save is called. :(
i also belive this has been fixed in the newer version of umbraco..
i have done somthing simular in a 4.7.2 and i ended up doing the update in campaingmonitor before i updatet the user in umbraco :)
this is a good read, discripes the issue
http://www.aaron-powell.com/the-great-umbraco-api-misconception
Hmm, fair enough.
I'll add a separate database table to keep track of email addresses so that I'll know the old values.
if its a frontend thing you could get the member whit old values, then do the logic for mailchimp, and efter that update the member section ? :)
is working on a reply...