From 8ab1939dd992a2c4d24f33e7d947c8d4d6052bfd Mon Sep 17 00:00:00 2001 From: Ibnu Maksum Date: Tue, 6 Aug 2024 10:17:31 +0700 Subject: [PATCH] check if pppoe customer already used by another customer --- system/controllers/customers.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/system/controllers/customers.php b/system/controllers/customers.php index d5828183..b6222faa 100644 --- a/system/controllers/customers.php +++ b/system/controllers/customers.php @@ -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') . '
'; + } + if(ORM::for_table('tbl_customers')->where('username', $pppoe_username)->find_one()){ + $msg.= Lang::T('PPPoE Username already used by another customer') . '
'; + } } if ($password != '' && $oldPassPassword != $password) { $passDiff = true;