online_customer using pppoe_username
This commit is contained in:
parent
f4944866a4
commit
b232ccddbf
@ -77,9 +77,9 @@ class MikrotikPppoe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function sync_customer($customer, $plan)
|
function sync_customer($customer, $plan)
|
||||||
{
|
{
|
||||||
$this->add_customer($customer, $plan);
|
$this->add_customer($customer, $plan);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -304,7 +304,15 @@ class MikrotikPppoe
|
|||||||
'/ppp active print',
|
'/ppp active print',
|
||||||
RouterOS\Query::where('name', $customer['username'])
|
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)
|
function info($name)
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
{
|
{
|
||||||
"version": "2025.1.7"
|
"version": "2025.1.16"
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user