mirror of
https://github.com/hotspotbilling/phpnuxbill.git
synced 2025-08-30 14:49:25 +02:00
disconnect PPPOE when plan change
This commit is contained in:
parent
721ef32e12
commit
aac8306d7b
1 changed files with 4 additions and 1 deletions
|
@ -29,6 +29,7 @@ class MikrotikPppoe
|
||||||
|
|
||||||
function add_customer($customer, $plan)
|
function add_customer($customer, $plan)
|
||||||
{
|
{
|
||||||
|
global $isChangePlan;
|
||||||
$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']);
|
||||||
//check if customer exists
|
//check if customer exists
|
||||||
|
@ -51,7 +52,9 @@ class MikrotikPppoe
|
||||||
$setRequest->setArgument('password', $pass);
|
$setRequest->setArgument('password', $pass);
|
||||||
$client->sendSync($setRequest);
|
$client->sendSync($setRequest);
|
||||||
//disconnect then
|
//disconnect then
|
||||||
//$this->removePpoeActive($client, $customer['username']);
|
if(isset($isChangePlan) && $isChangePlan){
|
||||||
|
$this->removePpoeActive($client, $customer['username']);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue