Merge pull request #327 from gerandonk/Development

make sync button not remove active hotspot user
This commit is contained in:
iBNu Maksum 2024-10-20 12:05:01 +07:00 committed by GitHub
commit ad862640cc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -33,8 +33,11 @@ class MikrotikHotspot
{ {
$mikrotik = $this->info($plan['routers']); $mikrotik = $this->info($plan['routers']);
$client = $this->getClient($mikrotik['ip_address'], $mikrotik['username'], $mikrotik['password']); $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']); $this->removeHotspotUser($client, $customer['username']);
if ($isExp){
$this->removeHotspotActiveUser($client, $customer['username']); $this->removeHotspotActiveUser($client, $customer['username']);
}
$this->addHotspotUser($client, $plan, $customer); $this->addHotspotUser($client, $plan, $customer);
} }