playSMS Forum

[Solved]Limit users to msgs allowed per hour

(akay) #1

I want to restrict users to a limited number of messages per hour so that they dont choke the network.

has anyone tried this.?

0 Likes

(Anton Raharja) #2

see in Settings -> Main configuration -> Default settings tab -> Number of sent SMS per hour limit

but it will affect the server, not just users

anton

1 Like

(Hamidreza Mahmoudi) #3

Is there anyway to limit it per user ?

0 Likes

(Edilson Spessoto) #4

Have to implement. Today, the limit per hour is global, but, with smal modification, think be possible implement per user.

1 Like

(Hamidreza Mahmoudi) #5

Thank you in advance.
How can I do it?

0 Likes

(Hamidreza Mahmoudi) #6

Can you help me? Thanks

0 Likes

(Edilson Spessoto) #7

Anton, if you are reading this, correct me if I´m wrong, please.

In this function

function sendsms_throttle_isoverlimit($uid, $limit = 0, $period = 60)

there is $uid parameter, I think was thought to limit user sendings. But, only 0 is used as $uid. Maybe, if you change to real user id, it works. But, then, you have to create an additional field into user table, to save indivitual limits.

1 Like

(Anton Raharja) #8

I remember vaguely that the $uid was there for the purpose of limiting per user bases, but never got a chance to work on it, so its 0 to be used as global limit by everyone

anton

1 Like