Merge pull request #327 from gerandonk/Development
make sync button not remove active hotspot user
This commit is contained in:
commit
ad862640cc
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user