Update radius.php

*Fix shared user limit
This commit is contained in:
AGSTR 2024-10-04 22:20:42 +07:00 committed by Ibnu Maksum
parent 3a929c5418
commit 277ab87645
No known key found for this signature in database
GPG Key ID: 7FC82848810579E5

View File

@ -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') {