You can't contact more than 3 users per hour. Please try again later.

I just got that message.. anyone know how I can fix that # to maybe 20, or selected users can have unlimited? As the admin, I would like to email as many people as I please.

Thanks in advanced guys :)

Comments

heine’s picture

For quick and dirty change (sitewide!) open modules/contact.module and modify the number in line 10

define('CONTACT_HOURLY_THRESHOLD', 3);

--
Tips for posting to the forums.
When your problem is solved, please post a follow-up to the thread you started.

kingrattus’s picture

url("user/$user->uid/edit"))); } else if (!flood_is_allowed('contact', CONTACT_HOURLY_THRESHOLD)) { $output = t("You can't contact more than %number users per

thats what line 10 says. I looked before line 10 & after & couldn't find a 3 to change to a higher #.

or did you mean to add , 3 (or a higher #) in that line??

Sorry, I'm still kinda new to this stuff & I did a # on my site before & don't want to kill it again.

heine’s picture

Open the same file and modify line 57

else if (!flood_is_allowed('contact', CONTACT_HOURLY_THRESHOLD)) {

to read

else if (!flood_is_allowed('contact', CONTACT_HOURLY_THRESHOLD) && !user_access('administer users')) {

This will enable everyone with the 'administer users' permission to exceed the limit. Note: untested and it's 2.19am so use with caution ;-).
--
Tips for posting to the forums.
When your problem is solved, please post a follow-up to the thread you started.

kingrattus’s picture

I don't have a line 57, argg!! The file is like 1 giant paragraph. here is that area I think your talking about. But its different...

array('%url' => url("user/$user->uid/edit"))); } else if (!flood_is_allowed('contact', CONTACT_HOURLY_THRESHOLD)) { $output = t("You can't contact more than %number users per hour. Please try again later.", array('%number' => CONTACT_HOURLY_THRESHOLD)); }

heine’s picture

I see...

You are in desperate need of a good text-editor. My favorite, PSpad, is free, lightweight and has syntax colouring.

And as a bonus the ability to deal with different line-endings.
Give it a try :-)

edited to add: the line numbers are valid for contact.module with the revision string: // $Id: contact.module,v 1.6.2.2 2005-08-17 00:56:13 unconed Exp $
--
Tips for posting to the forums.
When your problem is solved, please post a follow-up to the thread you started.

nedjo’s picture

... like (if you're using windows) editpad lite.

You can also try a mailing module, e.g. (for 4.6) mail module, which will let you email users of specific roles.

kingrattus’s picture

I asked Rob for some help. Found out why the file didn't open properly on PSPad (my fault). So I opened it correctly & it was PERFECT! I found line 10 & it looked proper & wasn't missing any code. Then line 57 was really line 66, but it was proper.

Rob showed me comments //
SO the origional code is still there & the new code is under it.

I'm so happy! I'm learning so much (slowly, but I'm trying). If it wasn't for you great guys, gals & Rob (my hubby), There would be no way I could ever do this.

Love ya guys :)

heine’s picture

You are right, it's line 66. My apologies. I have no idea what (/if)I was thinking; the if-else block begins on 57.

Glad to hear it's working!
--
Tips for posting to the forums.
When your problem is solved, please post a follow-up to the thread you started.

kingrattus’s picture

I have the email module :) thats what I was using when I got the above message

PakWaan’s picture

In 4.7 RC2, I find this string in 2 places - line 316 ( in function contact_mail_user) and 414 (in function contact_mail_page). Which one, or both, need to be changed?

I assume that this:

if (!flood_is_allowed('contact', variable_get('contact_hourly_threshold', 3)))

replaces the older string from 4.6 - and would be changed as such:

if (!flood_is_allowed('contact', variable_get('contact_hourly_threshold', 3) && !user_access('administer users'))

Is that correct?

DriesK’s picture

For 4.7, you don't need to change the code!

Simply go to administer->contact form->settings tab. There you'll find a nice dropdown list for the hourly threshold.

PakWaan’s picture

Yes, but this setting applies to everyone - the original poster (and I) were trying to find a way for the admin to be able to contact as many people as they want, and still limit regular users to avoid them spamming other users through the contact form.

kingrattus’s picture

thanks guys :)

I will have to wait until I get my websites back.. long story short.. was cheated on (bye bye 7yr relationship) & I moved out a month ago.. I am just getting access to my tared up sites today, so once I "learn" how to un tar them, get them onto my host & get them working. I'll get back to this & will let you know how its working I understand how to use PSPad now, so I should have too many issues :)

I really do thank you guys for all your wonderful help!!

kingrattus’s picture

oh man, I'm sooo lost.. I think I'll get Rob to read this & show me what you guys are talking about & how to use this new program... I knew I should have taken this stiff in school.. but noo I had to get into law :P