You are here

function mass_contact_site_page in Mass Contact 6

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. 7 mass_contact.page.inc \mass_contact_site_page()

The mail page

Return value

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
Implementation of hook_menu().

File

./mass_contact.module, line 1034
This is the main code file for the Mass Contact module. This module enables users to contact multiple users through selected roles.

Code

function mass_contact_site_page() {
  global $user;
  if (!user_access('administer mass contact') && !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;
}