remove customer check pppoe_username

This commit is contained in:
Ibnu Maksum 2024-08-06 09:21:19 +07:00
parent 271dd2934a
commit a09bfc01bf
No known key found for this signature in database
GPG key ID: 7FC82848810579E5

View file

@ -51,6 +51,8 @@ class MikrotikPppoe
}
if (!empty($customer['pppoe_ip'])) {
$setRequest->setArgument('local-address', $customer['pppoe_ip']);
}else{
$setRequest->setArgument('local-address', null);
}
$setRequest->setArgument('profile', $plan['name_plan']);
$setRequest->setArgument('comment', $customer['fullname'] . ' | ' . $customer['email'] . ' | ' . implode(', ', User::getBillNames($customer['id'])));
@ -72,8 +74,14 @@ class MikrotikPppoe
$this->add_customer($customer, $p);
} else {
$this->removePpoeUser($client, $customer['username']);
if (!empty($customer['pppoe_username'])) {
$this->removePpoeUser($client, $customer['pppoe_username']);
}
}
$this->removePpoeActive($client, $customer['username']);
if (!empty($customer['pppoe_username'])) {
$this->removePpoeActive($client, $customer['pppoe_username']);
}
}
// customer change username