From 597194fa5816901c98894c3f854575e5885df7c2 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Tue, 25 Mar 2008 14:07:34 +0000 Subject: - Patch #223175 by cwgordon07: administers should be able to send as many contacts as they want. --- modules/contact/contact.pages.inc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'modules') diff --git a/modules/contact/contact.pages.inc b/modules/contact/contact.pages.inc index 82d1bb95f..5a53eeddd 100644 --- a/modules/contact/contact.pages.inc +++ b/modules/contact/contact.pages.inc @@ -13,7 +13,7 @@ function contact_site_page() { global $user; - if (!flood_is_allowed('contact', variable_get('contact_hourly_threshold', 3))) { + if (!flood_is_allowed('contact', variable_get('contact_hourly_threshold', 3)) && !user_access('administer site-wide contact form')) { $output = t("You cannot send more than %number messages per hour. Please try again later.", array('%number' => variable_get('contact_hourly_threshold', 3))); } else { @@ -160,8 +160,8 @@ function contact_user_page($account) { if (!valid_email_address($user->mail)) { $output = t('You need to provide a valid e-mail address to contact other users. Please update your user information and try again.', array('@url' => url("user/$user->uid/edit"))); } - else if (!flood_is_allowed('contact', variable_get('contact_hourly_threshold', 3))) { - $output = t('You cannot contact more than %number users per hour. Please try again later.', array('%number' => variable_get('contact_hourly_threshold', 3))); + else if (!flood_is_allowed('contact', variable_get('contact_hourly_threshold', 3)) && !user_access('administer site-wide contact form')) { + $output = t("You cannot send more than %number messages per hour. Please try again later.", array('%number' => variable_get('contact_hourly_threshold', 3))); } else { drupal_set_title(check_plain($account->name)); -- cgit v1.2.3