Only suspend over bandwidth when station is active

This commit is contained in:
Albert Santoni 2015-12-09 13:03:41 -05:00
parent 09316041c6
commit e3b0a93ebb
1 changed files with 2 additions and 1 deletions

View File

@ -160,7 +160,8 @@ class ApiController extends Zend_Controller_Action
Application_Model_Preference::setBandwidthLimitUpdateTimer();
$usage = Application_Model_Preference::getBandwidthLimitCounter();
if ($usage > Application_Model_Preference::getBandwidthLimit()) {
if (($usage > Application_Model_Preference::getBandwidthLimit()) &&
(Application_Model_Preference::getProvisioningStatus() == PROVISIONING_STATUS_ACTIVE)) {
$CC_CONFIG = Config::getConfig();
// Hacky way to get the user ID...
$url = AIRTIMEPRO_API_URL . "/station/" . $CC_CONFIG['rabbitmq']['user'] . "/suspend";