Closed (fixed)
Project:
Mailchimp
Version:
6.x-2.5
Component:
General
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
14 May 2011 at 15:11 UTC
Updated:
3 Oct 2011 at 23:01 UTC
Question, what happens if a user updates their e-mail address on Drupal? Does Mail Chimp update the e-mail address as well?
Comments
Comment #1
eelkeblokI have been trying to get an answer to this same question. It looks like it works this way:
- For required lists, changes are synchronized immediately, using hook_user
- For other lists, changes are only made when saving subscriptions
Now, for the latter case I haven't investigated the code thoroughly enough yet, but it seems to me that at that point, the system will have no way to know that a user changed their email-address. It will be able to find that the user is not subscribed with their current email-address, but it will not know to also remove the old email-address. I'd say this is a serious flaw. The point is discussed briefly in this older issue: http://drupal.org/node/770528. levelos comments there that here were some issues trying to get the sync to work for other lists than required ones. I'd be interested to discuss these issues, because without this kind of integration, I'm pretty certain I'll run into issues down the line with the subscriber list getting poluted with old, unused addresses because of people changing their email-addresses.
Comment #2
eelkeblokTo make the discussion more concrete, in the previously linked issue, another user posts an implementation of hook_user to take care of the synchronization of the email address and I suppose that could be used for other fields too. The implementation is crude (with calls being made directly to Mailchimp instead of using the API wrapper and config variables added by this module), but the basic approach seems fine. Or am I missing something?
Comment #3
jerry commentedWhat I've observed using 6.x-2.5: even required lists don't handle user E-mail address changes gracefully. The new address is added automatically, but the old one is not removed. The behavior is the same whether sync-via-cron is used or not. Has anyone else observed this?
Comment #4
crispinbailey commentedSubscribing
Comment #5
ericbroder commentedI'm seeing the same results as jerry. For a required list, not using "Sync Required Lists During Cron", when a user edits their email address the new email address is added to MailChimp list and the old one is not removed. This seems like a bug, I assume we should not be emailing the user at both their new and their old addresses.
Steps to reproduce:
- Configure MailChimp module to subscribe users to a required list upon user registration.
- Create new user at user/register and confirm user is added to MailChimp list.
- Go to user/edit page and update email address.
- Expected result is that MailChimp list should update user's email address and not hold onto old email address. Instead, actual result is that new subscriber is created with new email address, and old email address is still subscribed to list as a separate entry.
My environment:
- Drupal 6.22
- MailChimp 6.x-2.5
Comment #6
bleedev commentedCurrently user email addresses are only updated for "Required Lists". Unfortunately fixing this for all list would require a major architectural change. For more information please see #1226958.
Comment #7
jerry commentedCan you comment on my observation above, where I note that even for required lists, old E-mail addresses are not removed? ericbroder reported a similar observation. Perhaps correcting this for required lists only wouldn't involve the major effort described.
Comment #8
bleedev commentedJerry - This should be resolved in the latest maintenance release: http://drupal.org/node/1291478
Comment #9
jerry commentedThanks for the pointer; I hadn't noticed yesterday's release. I just re-tested after updating the module, and while it removed the old address properly when cron updates were disabled, it did not do so when cron updates were enabled. Can anyone else corroborate this?
Comment #10
bleedev commentedI tested that scenario and got the same results. Will follow up after researching the cause.
Comment #11
bleedev commentedI tested that scenario and got the same results. Will follow up after researching the cause.
Comment #12
bleedev commentedCommitted update (currently in the Dev branch) that de-couples email address updates from cron processing. Email addresses updates should now be processed when the Drupal user is update whether cron processing is turned on or not.