You are here

function _mailchimp_get_user_tokens in Mailchimp 6.2

Same name and namespace in other branches
  1. 5.2 mailchimp.module \_mailchimp_get_user_tokens()
  2. 5 mailchimp.module \_mailchimp_get_user_tokens()
  3. 6 mailchimp.module \_mailchimp_get_user_tokens()

Get the user tokens for merging

1 call to _mailchimp_get_user_tokens()
mailchimp_mailchimp_merge_values in ./mailchimp.module
Implementation of hook_mailchimp_merge_values

File

./mailchimp.module, line 896
Mailchimp module.

Code

function _mailchimp_get_user_tokens($user) {
  $out = array();
  if (function_exists('token_get_values')) {
    $vars = token_get_values('user', $user);
    foreach ($vars->tokens as $key => $value) {
      $out['token_' . $value] = $vars->values[$key];
    }
  }
  return $out;
}