You are here

function mass_contact_site_page in Mass Contact 7

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

The mail page.

Return value

array Either an error, if flood control is active and triggered, or a rendered form.

1 string reference to 'mass_contact_site_page'
mass_contact_menu in ./mass_contact.module
Implements hook_menu().

File

./mass_contact.page.inc, line 15
The main form for creating and sending the messages.

Code

function mass_contact_site_page() {
  if (!user_access('mass contact administer') && !flood_is_allowed('mass_contact', variable_get('mass_contact_hourly_threshold', 3))) {
    $output = t("You cannot send more than %number messages per hour. Please try again later.", array(
      '%number' => variable_get('mass_contact_hourly_threshold', 3),
    ));
  }
  else {
    $output = drupal_get_form('mass_contact_mail_page');
  }
  return $output;
}