update: fix capacity

This commit is contained in:
tokumeikoi 2022-08-03 01:16:56 +08:00
parent 1c644e8c5f
commit bd1ec0fe89

View File

@ -19,7 +19,7 @@ class PlanService
{ {
if ($this->plan->capacity_limit === NULL) return true; if ($this->plan->capacity_limit === NULL) return true;
$count = self::countActiveUsers(); $count = self::countActiveUsers();
$count = $count[$this->plan->plan_id]; $count = $count[$this->plan->id];
return ($this->plan->capacity_limit - $count) > 0; return ($this->plan->capacity_limit - $count) > 0;
} }