check if pppoe customer already used by another customer

This commit is contained in:
Ibnu Maksum 2024-08-06 10:17:31 +07:00
parent a3c255e77a
commit 8ab1939dd9
No known key found for this signature in database
GPG Key ID: 7FC82848810579E5

View File

@ -540,6 +540,12 @@ switch ($action) {
}
if ($oldPppoeUsername != $pppoe_username) {
$pppoeDiff = true;
if(ORM::for_table('tbl_customers')->where('pppoe_username', $pppoe_username)->find_one()){
$msg.= Lang::T('PPPoE Username already used by another customer') . '<br>';
}
if(ORM::for_table('tbl_customers')->where('username', $pppoe_username)->find_one()){
$msg.= Lang::T('PPPoE Username already used by another customer') . '<br>';
}
}
if ($password != '' && $oldPassPassword != $password) {
$passDiff = true;