User gets unsubscribed from Required list when editing user profile
| Project: | MailChimp |
| Version: | 5.x-2.0 |
| Component: | User interface |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | duplicate |
Jump to:
I have an undesired case where users get unsubscribed from a Required Mailchimp list when their user details are updated (by themselves or admin) after account creation. This is case 2 below. To show the module is otherwise working fine in my setup I also describe a case 1 first:
CASE 1: Everything is working fine
Drupal User Settings:
Visitors can create accounts, no admin approval required
Require email verification: No
Mailchimp Module settings (one list):
Role: anonymous user + authenticated user
Subscription Method: Opt-out
Require subscribers to double opt-in: Yes
Show subscription options on user reg. page: Yes
Show subscription options on user edit screen: Yes
Sync Required list during cron: No
When a vistor creates a new account he gets the Drupal welcome email and the Mailchimp opt-in email with the link that he clicks. He is added to the Mailchimp list with all his Drupal site details (first name, last name etc.). He updates his account details on Drupal (first name), hits submit and the details get changed on the Mailchimp list.
CASE 2 User gets unsubscribed in error when Drupal account details get changed afte account creation
Drupal User Settings and Mailchimp Module Settings as above except Subscription Method now set to Required.
Vistor creates new account, gets Drupal welcome email, he is added to the Mailchimp list with all his details BUT when he or admin updates his account details and hits submit, he gets unsubscribed from the Mailchimp list and receives the unsubscribe email from Mailchimp.
CASE 3
As case 2 except that Sync Required list during cron is set to Yes. When user or admin now update a user account and hit submit, user does not get unsubscribed and his details get updated to the Mailchimp list with the next cron job. All users get synched every hour when cron runs (and getting all the messages back from Mailchimp about users that cannot be added because they bounced/unsubscribed)
Question: Has anybody else seen the problem I describe with case 2 is this the expected behaviour of the Mailchimp module, I hope not. Is there anything I have setup wrong perhaps?
Thanks for any help.

#1
of #527964: hook_user is subscribe/unsubscribe users accidentally