function webform_mailchimp_log_subscription in Webform Mailchimp 7.4
Same name and namespace in other branches
- 7.2 webform_mailchimp.module \webform_mailchimp_log_subscription()
Log a subscription status to the watchdog table.
Parameters
string $email_address: The email address.
bool $status: If the subscription was successful.
string $error_code: The error code if there was an error.
string $error_message: The error message.
1 call to webform_mailchimp_log_subscription()
File
- ./
webform_mailchimp.module, line 181 - Webform Mailchimp integrates mailchimp into the webforms module.
Code
function webform_mailchimp_log_subscription($email_address, $status, $error_code = '', $error_message = '') {
if ($status) {
watchdog('webform_mailchimp', 'E-mail subscribed: %email', array(
'%email' => $email_address,
), WATCHDOG_INFO);
}
else {
watchdog('webform_mailchimp', 'E-mail not subscribed: %email Error: %error_code <br> %error_message', array(
'%email' => $email_address,
'%error_message' => $error_message,
'%error_code' => $error_code,
), WATCHDOG_ERROR);
}
}