The invite app in its current state is a time bomb that can bring your network to a halt. 

Here is a scenario that you might, and or will, encounter with your super successful website.

Today, there is no way to limit the number of invitations that a member can send. To build your network, you have to have members, to have members, you can grow by one of multiple ways. The one that makes sense to a few, is to ask your members to invite their friends, families, contacts, e.t.c

I love the e.t.c component, so I google for lists of all people in my city (poplulation 3 million), wonderful phpFox only requires that the email addresses be comma separated... easy enough to do with excel.  Copy the email addresses, paste ALL 3 million of them into your invite message, and boom... You've been banned by your ISP, your server has crashed, you have been blacklisted as the spammer that you are, and slapped with a $12million spam fine.

Would a simple limitatin system work?

Limit number of invitations that a specific group can post;

   - At a time (e.g 10)

  - Per Day/Month/Year (e.g 100)

I doubt this will ever be in-built by the phpfox team; hey, they have too much work to do building the video chat thing to put out of business, but I digress. 

Any dev interested in doing this? Or, do you know of any freelance developer who can add this logic?



 is a 


So looking at this today and figure out a hack to use.  Please remember changing the code is not recommended by PhpFox and this hack could be written over during any upgrades or updates.  Please make a copy of the original file so you have a backup copy.  This hack could have taken hours to implement but it didn't :)

PF.Base/module/invite/include/component/controller/index.class.php ; (est. line number 26)

What we are going to do is limit the explode.  It will take the number you enter and separate those emails correctly but after that number, it will combine the rest into one long email/string and of course will not be valid and error out before attempting to send.  So if you explode with a limit of three then it would take this:,,,,,,

into this,,,,

So, of course, the last line is not a single email address and will error out so only the first two emails will get invites.  this would stop someone from sending 1000 emails by using limits on the explode function.

Original Code:

$aMails = explode(',', $aVals['emails']);

New Code to limit to invite 2 emails per each time they click the send invitation button.

$aMails = explode(',', $aVals['emails'], 3);

New Code to limit to invite 100 emails per each time they click the send invitation button.

$aMails = explode(',', $aVals['emails'], 101);

Last update on June 25, 2020 by JohnJr.
Be the first person to like this.

You will of course want to also go into your phrase settings and look up

Separate multiple emails with a comma

and change it so the user knows there is a max limit to send each time so they don't think it is a bug.

If you did the 101 limit, you could do something like this.

Separate multiple emails with a comma (max limit of emails sent is 100)

I would not indicated each time because a bad person might take advantage of that, but if he thinks the max is 100 total or whatever number you come up with, they might not waste their time.


I think I am going to set mine at 11 so I will only except 10 emails per submit.

Hope this helps



Friggin genius... Will try it out later on when my brain is not weekend fried. 


Thanks much.