done, maybe, need to test all

This commit is contained in:
Ibnu Maksum
2024-06-07 17:21:29 +07:00
parent c661976eae
commit 7a94254df9
8 changed files with 64 additions and 35 deletions

View File

@ -208,6 +208,23 @@ class MikrotikPppoe
);
}
function online_customer($customer, $router_name)
{
global $_app_stage;
if ($_app_stage == 'demo') {
return;
}
$mikrotik = $this->info($router_name);
$client = $this->getClient($mikrotik['ip_address'], $mikrotik['username'], $mikrotik['password']);
$printRequest = new RouterOS\Request(
'/ppp active print',
RouterOS\Query::where('user', $customer['username'])
);
return $client->sendSync($printRequest)->getProperty('.id');
}
function connect_customer($customer, $ip, $mac_address, $router_name)
{
global $_app_stage;