diff --git a/system/devices/MikrotikPppoe.php b/system/devices/MikrotikPppoe.php index a3419d52..7b3fdac6 100644 --- a/system/devices/MikrotikPppoe.php +++ b/system/devices/MikrotikPppoe.php @@ -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) diff --git a/version.json b/version.json index 80f132cc..9b836b0c 100644 --- a/version.json +++ b/version.json @@ -1,3 +1,3 @@ { - "version": "2025.1.7" + "version": "2025.1.16" } \ No newline at end of file