From 59fed33797221003ef5ec730946f84588f3606a4 Mon Sep 17 00:00:00 2001 From: Max Kostikov Date: Tue, 30 Jul 2019 11:54:14 +0200 Subject: Do not control limits on service class settings with 0 values --- include/account.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/account.php b/include/account.php index 5f0c8737f..5dd91f909 100644 --- a/include/account.php +++ b/include/account.php @@ -668,7 +668,7 @@ function downgrade_accounts() { function service_class_allows($uid, $property, $usage = false) { $limit = service_class_fetch($uid, $property); - if($limit === false) + if($limit == false) return true; // No service class set => everything is allowed $limit = engr_units_to_bytes($limit); -- cgit v1.2.3 From d4a038c437a231ceba1ad79fe0c2f9a48e3afce1 Mon Sep 17 00:00:00 2001 From: Max Kostikov Date: Tue, 30 Jul 2019 13:59:12 +0200 Subject: Update account.php --- include/account.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/account.php b/include/account.php index 5dd91f909..7546657fd 100644 --- a/include/account.php +++ b/include/account.php @@ -668,10 +668,12 @@ function downgrade_accounts() { function service_class_allows($uid, $property, $usage = false) { $limit = service_class_fetch($uid, $property); - if($limit == false) + if($limit === false) return true; // No service class set => everything is allowed $limit = engr_units_to_bytes($limit); + if($limit == 0) + return true; // 0 means no limits if($usage === false) { // We use negative values for not allowed properties in a subscriber plan return ((x($limit)) ? (bool) $limit : true); -- cgit v1.2.3