Copied to clipboard

Flag this post as spam?

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


  • Alasdair North 2 posts 32 karma points
    Jun 05, 2013 @ 14:45
    Alasdair North
    0

    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?

  • Kasper Holm 47 posts 180 karma points
    Jun 05, 2013 @ 15:05
    Kasper Holm
    100

    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

  • Alasdair North 2 posts 32 karma points
    Jun 05, 2013 @ 15:08
    Alasdair North
    0

    Hmm, fair enough.

    I'll add a separate database table to keep track of email addresses so that I'll know the old values.

  • Kasper Holm 47 posts 180 karma points
    Jun 05, 2013 @ 15:40
    Kasper Holm
    0

    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 ? :)

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies