From 277ab876458bba7612968415730849513e00a402 Mon Sep 17 00:00:00 2001 From: AGSTR <144728914+agstrxyz@users.noreply.github.com> Date: Fri, 4 Oct 2024 22:20:42 +0700 Subject: [PATCH] Update radius.php *Fix shared user limit --- radius.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/radius.php b/radius.php index 36aced40..b14c5551 100644 --- a/radius.php +++ b/radius.php @@ -365,7 +365,7 @@ function process_radiust_rest($tur, $code) $plan = ORM::for_table('tbl_plans')->where('id', $tur['plan_id'])->find_one(); $bw = ORM::for_table("tbl_bandwidth")->find_one($plan['id_bw']); $USRon = ORM::for_table('radacct')->where('username', $tur['username'])->where_raw("acctstoptime IS NULL")->count(); - if ($USRon >= $plan['shared_users']) { + if ($USRon >= $plan['shared_users'] && $plan['type'] == 'Hotspot') { show_radius_result(["control:Auth-Type" => "Accept", 'Reply-Message' => 'You are already logged in - access denied ('.$USRon.')'], 401); } if ($bw['rate_down_unit'] == 'Kbps') {