allow $pppoe_username so it will back to customer username

This commit is contained in:
Ibnu Maksum 2024-08-06 10:21:26 +07:00
parent cb0e77523d
commit 3ca43c69a8
No known key found for this signature in database
GPG Key ID: 7FC82848810579E5
2 changed files with 9 additions and 6 deletions

View File

@ -541,11 +541,13 @@ switch ($action) {
$userDiff = true;
}
if ($oldPppoeUsername != $pppoe_username) {
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(!empty($pppoe_username)){
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>';
}
}
$pppoeDiff = true;
}

View File

@ -694,5 +694,6 @@
"_": "-",
"Routers_Maps": "Routers Maps",
"Routers_Geo_Location_Information": "Routers Geo Location Information",
"Coverage": "Coverage"
"Coverage": "Coverage",
"PPPoE_Username_already_used_by_another_customer": "PPPoE Username already used by another customer"
}