diff options
author | Dries Buytaert <dries@buytaert.net> | 2008-03-25 14:07:34 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2008-03-25 14:07:34 +0000 |
commit | 597194fa5816901c98894c3f854575e5885df7c2 (patch) | |
tree | d86e8b38835570c9af3bbfdc9695a87b34a00486 | |
parent | a01deb1b1a112d23589289e7ed491295b7611b85 (diff) | |
download | brdo-597194fa5816901c98894c3f854575e5885df7c2.tar.gz brdo-597194fa5816901c98894c3f854575e5885df7c2.tar.bz2 |
- Patch #223175 by cwgordon07: administers should be able to send as many contacts as they want.
-rw-r--r-- | modules/contact/contact.pages.inc | 6 |
1 files changed, 3 insertions, 3 deletions
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 <a href="@url">user information</a> 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)); |