mirror of
https://github.com/hotspotbilling/phpnuxbill.git
synced 2025-08-04 10:15:03 +02:00
online_customer using pppoe_username
This commit is contained in:
parent
f4944866a4
commit
b232ccddbf
2 changed files with 12 additions and 4 deletions
|
@ -77,9 +77,9 @@ class MikrotikPppoe
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function sync_customer($customer, $plan)
|
||||
{
|
||||
{
|
||||
$this->add_customer($customer, $plan);
|
||||
}
|
||||
|
||||
|
@ -304,7 +304,15 @@ class MikrotikPppoe
|
|||
'/ppp active print',
|
||||
RouterOS\Query::where('name', $customer['username'])
|
||||
);
|
||||
return $client->sendSync($printRequest)->getProperty('.id');
|
||||
$id = $client->sendSync($printRequest)->getProperty('.id');
|
||||
if(empty($id)){
|
||||
$printRequest = new RouterOS\Request(
|
||||
'/ppp active print',
|
||||
RouterOS\Query::where('name', $customer['pppoe_username'])
|
||||
);
|
||||
$id = $client->sendSync($printRequest)->getProperty('.id');
|
||||
}
|
||||
return $id;
|
||||
}
|
||||
|
||||
function info($name)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue