Plan For Expired Customer

This commit is contained in:
Ibnu Maksum
2024-06-11 13:28:05 +07:00
parent 55b32ce0da
commit e685c5d702
13 changed files with 72 additions and 169 deletions

View File

@ -23,8 +23,10 @@ class Radius {
if ($_app_stage == 'demo') {
return;
}
if (empty($plan['pool_expired'])) {
if (empty($plan['plan_expired'])) {
$p = ORM::for_table("tbl_plans")->find_one($plan['plan_expired']);
$this->customerDeactivate($customer['username']);
$this->customerAddPlan($customer, $p);
} else {
$this->upsertCustomerAttr($customer['username'], 'Framed-Pool', $plan['pool_expired'], ':=');
$this->disconnectCustomer($customer['username']);