make sync button not remove active hotspot user

make sync button not remove active hotspot user
This commit is contained in:
gerandonk 2024-10-20 01:07:00 +07:00
parent d4c34afb8d
commit a4e8ae8c5c

View File

@ -33,8 +33,11 @@ class MikrotikHotspot
{
$mikrotik = $this->info($plan['routers']);
$client = $this->getClient($mikrotik['ip_address'], $mikrotik['username'], $mikrotik['password']);
$isExp = ORM::for_table('tbl_plans')->select("id")->where('plan_expired', $plan['id'])->find_one();
$this->removeHotspotUser($client, $customer['username']);
if ($isExp){
$this->removeHotspotActiveUser($client, $customer['username']);
}
$this->addHotspotUser($client, $plan, $customer);
}