function constant_contact_user_delete in Constant Contact 7.3
Implements hook_user_delete().
File
- ./
constant_contact.module, line 497
Code
function constant_contact_user_delete($account) {
// we need to determine if an admin user is performing this action
$action_type = 'contact';
$cc = constant_contact_create_object();
if (!is_object($cc)) {
return;
}
// Find out if contact is subscribed.
$contact = $cc
->query_contacts($account->mail);
// Important, as this tells CC that the contact or customer made this action.
$cc
->set_action_type($action_type);
// If subscribed, remove them.
if ($contact) {
$cc
->delete_contact($contact['id']);
}
}