Suspending Accounts

LawsHosting

Verified User
Joined
Sep 13, 2008
Messages
2,418
Location
London UK
Here's a scenario..... Say an account gets suspended due to bandwidth limits, then an overdue invoice is due a day or so after this, so via API it gets suspended... Shouldn't the second suspension over-ride the first when the 'action=reset&value=all' is run? Currently the reset unsuspends regardless.

Maybe a FR?
 
The second invoicing comes into play, that's going to be up to the billing software to determine if they've paid or not, and to decided if the suspension should still happen.
As far as DA knows, they've paid for X bandwidth per month, they've used it all, so they don't get anymore until the next month, at which point they're unsuspended because that falls into the next months usage.

If the client wants to be unsuspended for the current month, then once you get paid the overdue bit, then you'd use the "Additional Bandwidth" field to give them a little bit more.

If you're referring to the API doing the suspension, that should always stick.
Only DA suspension (for bandwidth mainly) will ever be undone.
The difference is set in the user.conf as field:
account=ON | OFF

where a DA suspension sets suspended=yes and leaves account=ON.
If you suspend via the API, it would be suspended=yes and account=OFF.

DA won't unsuspend an "account=OFF" User.

John
 
where a DA suspension sets suspended=yes and leaves account=ON. If you suspend via the API, it would be suspended=yes and account=OFF.
So, if it suspends an account due to bandwidth/etc limits, it should do: suspended=yes and account=ON

And if it get suspended via API, even though the account is already suspended due to the above scenario, the account should be changed to suspended=yes and account=OFF? Then the monthly reset shouldn't touch it, correct?
 
Hello,

So, if it suspends an account due to bandwidth/etc limits, it should do: suspended=yes and account=ON
Correct.

Oh, you're suspending them twice. Sorry, I misread that.

Looking at the code, if the account is already suspended, your API call won't have any effect.
DA doesn't re-suspend an account that's already suspended. The "account=" setting won't be changed.
Thus, yes, it would be unsuspended upon the reset.

John
 
Is there a way to change this? Maybe with a .conf option?

I know it's petty, but I'm sure you can appreciate my situation.. I have lots of clients, and although I receive DA suspension emails, it'll be time consuming if the scenario was to happen again... This time it was only one client.

Thanks
 
Thanks for the addition.

So, if accounts are automatically suspended, then if an API call was to suspend it again afterwards, the account will be set to OFF, correct?
 
Last edited:
Back
Top