When adding a new user anonymously, CM fires hook_campaignmonitor_subscribe(), which is picked up by:
function campaignmonitor_local_campaignmonitor_subscribe($list_id, $email) {
// Add local record.
$uid = campaignmonitor_get_uid_from_email($email);
campaignmonitor_local_dbmerge($uid, $list_id);
}
However, $uid will come back null and the operation will fail. This is my workaround but isn't likely to be correct:
function campaignmonitor_local_campaignmonitor_subscribe($list_id, $email) {
// Add local record.
$uid = campaignmonitor_get_uid_from_email($email);
if (isset($uid) && is_numeric($uid)) {
campaignmonitor_local_dbmerge($uid, $list_id);
}
}
For the moment it prevents the user from being told the subscription failed (it actually has updated remotely at this point).
Closed: outdated
1.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.