Update account.php

This commit is contained in:
Max Kostikov 2019-07-30 13:59:12 +02:00
parent 59fed33797
commit d4a038c437

View File

@ -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);