function _mailchimp_load_user_list_mergevars in Mailchimp 6
Same name and namespace in other branches
- 5.2 mailchimp.module \_mailchimp_load_user_list_mergevars()
- 5 mailchimp.module \_mailchimp_load_user_list_mergevars()
- 6.2 mailchimp.module \_mailchimp_load_user_list_mergevars()
- 7 mailchimp.module \_mailchimp_load_user_list_mergevars()
Get the relevent merge vars for the given user for the given list
2 calls to _mailchimp_load_user_list_mergevars()
- mailchimp_cron in ./
mailchimp.module - Implementation of hook_cron. Resubscribes all users to the required lists if the user has chosen to do so.
- mailchimp_user in ./
mailchimp.module
File
- ./
mailchimp.module, line 661 - Mailchimp module.
Code
function _mailchimp_load_user_list_mergevars($uid, $list_id, $mergevars) {
$account = mailchimp_get_merge_values($uid);
$uservars = array(
'EMAIL' => $account['mail'],
);
foreach ($mergevars as $mergevar) {
if ($key = variable_get('mailchimp_list_' . $list_id . '_merge_' . $mergevar['tag'], '')) {
$uservars[$mergevar['tag']] = $account[$key];
}
}
return $uservars;
}