You are here

function mailchimp_subscribe_page in Mailchimp 7

Same name and namespace in other branches
  1. 6.2 mailchimp.module \mailchimp_subscribe_page()

Return all available MC lists a given user can subscribe to

@global <type> $user

Return value

<type> page content of all available MC lists for a given user

1 string reference to 'mailchimp_subscribe_page'
mailchimp_menu in ./mailchimp.module
Implements hook_menu().

File

./mailchimp.module, line 468
Mailchimp module.

Code

function mailchimp_subscribe_page() {
  global $user;
  $ret = '';
  if ($user->uid) {
    $ret = drupal_get_form('mailchimp_subscribe_auth_form', $user);
  }
  elseif ($q = _mailchimp_get_api_object()) {
    $ret = drupal_get_form('mailchimp_subscribe_anon_form_all', $q);
  }
  return $ret;
}