online_customer using pppoe_username

This commit is contained in:
iBNu Maksum 2025-01-16 09:54:48 +07:00
parent f4944866a4
commit b232ccddbf
No known key found for this signature in database
GPG Key ID: 7FC82848810579E5
2 changed files with 12 additions and 4 deletions

View File

@ -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)

View File

@ -1,3 +1,3 @@
{ {
"version": "2025.1.7" "version": "2025.1.16"
} }