diff options
Diffstat (limited to 'include/account.php')
-rw-r--r-- | include/account.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/account.php b/include/account.php index 5f0c8737f..bea84cea7 100644 --- a/include/account.php +++ b/include/account.php @@ -672,6 +672,8 @@ function service_class_allows($uid, $property, $usage = 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); @@ -759,7 +761,7 @@ function service_class_fetch($uid, $property) { if(! is_array($arr) || (! count($arr))) return false; - return((array_key_exists($property, $arr)) ? $arr[$property] : false); + return((array_key_exists($property, $arr) && $arr[$property] != 0) ? $arr[$property] : false); } /** |