From 4f975fbf0d1d3de980cdf36f19b35078681e6ab3 Mon Sep 17 00:00:00 2001 From: Ibnu Maksum Date: Tue, 24 Oct 2023 09:19:35 +0700 Subject: [PATCH] fix logic pool_expired radius --- system/cron.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system/cron.php b/system/cron.php index 38036596..1b0f362f 100644 --- a/system/cron.php +++ b/system/cron.php @@ -103,7 +103,7 @@ foreach ($d as $ds) { $p = ORM::for_table('tbl_plans')->where('id', $u['plan_id'])->find_one(); if ($p['is_radius']) { - if (!empty($p['pool_expired'])) { + if (empty($p['pool_expired'])) { print_r(Radius::customerDeactivate($c['username'])); } else { Radius::upsertCustomerAttr($c['username'], 'Framed-Pool', $plan['pool_expired'], ':='); @@ -157,7 +157,7 @@ foreach ($d as $ds) { $p = ORM::for_table('tbl_plans')->where('id', $u['plan_id'])->find_one(); if ($p['is_radius']) { - if (!empty($p['pool_expired'])) { + if (empty($p['pool_expired'])) { print_r(Radius::customerDeactivate($c['username'])); } else { Radius::upsertCustomerAttr($c['username'], 'Framed-Pool', $plan['pool_expired'], ':=');