From fa5a42fc0c2264fd6aa49b3d9a4af2b825442bb0 Mon Sep 17 00:00:00 2001 From: ABDALRAHMAN MOLOOD Date: Wed, 14 Aug 2024 15:27:06 +0300 Subject: [PATCH] Update radius.php --- radius.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/radius.php b/radius.php index 09e09bf..183f2e0 100644 --- a/radius.php +++ b/radius.php @@ -233,7 +233,7 @@ try { $v->status = "1"; $v->used_date = date('Y-m-d H:i:s'); $v->save(); - $tur = ORM::for_table('tbl_user_recharges')->whereRaw("BINARY `code` = '$username'")->find_one(); + $tur = ORM::for_table('tbl_user_recharges')->whereRaw("BINARY `username` = '$username'")->find_one(); if ($tur) { process_radiust_rest($tur, $code); } else { @@ -324,7 +324,7 @@ try { $d->dateAdded = date('Y-m-d H:i:s'); $d->save(); if ($d->acctstatustype == 'Start') { - $tur = ORM::for_table('tbl_user_recharges')->whereRaw("BINARY `code` = '$username'")->where('status', 'on')->where('routers', 'radius')->find_one(); + $tur = ORM::for_table('tbl_user_recharges')->whereRaw("BINARY `username` = '$username'")->where('status', 'on')->where('routers', 'radius')->find_one(); $plan = ORM::for_table('tbl_plans')->where('id', $tur['plan_id'])->find_one(); if ($plan['limit_type'] == "Data_Limit" || $plan['limit_type'] == "Both_Limit") { $totalUsage = $d['acctOutputOctets'] + $d['acctInputOctets'];