diff --git a/system/controllers/customers.php b/system/controllers/customers.php
index baee9405..511040e3 100644
--- a/system/controllers/customers.php
+++ b/system/controllers/customers.php
@@ -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') . '
';
- }
- if(ORM::for_table('tbl_customers')->where('username', $pppoe_username)->find_one()){
- $msg.= Lang::T('PPPoE Username already used by another customer') . '
';
+ 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') . '
';
+ }
+ if(ORM::for_table('tbl_customers')->where('username', $pppoe_username)->find_one()){
+ $msg.= Lang::T('PPPoE Username already used by another customer') . '
';
+ }
}
$pppoeDiff = true;
}
diff --git a/system/lan/english.json b/system/lan/english.json
index e775eb4f..5797a2d0 100644
--- a/system/lan/english.json
+++ b/system/lan/english.json
@@ -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"
}
\ No newline at end of file