From 847f074a6b33dd8e49177906643e71bfbbe83489 Mon Sep 17 00:00:00 2001 From: Ibnu Maksum Date: Thu, 18 Jul 2024 09:52:53 +0700 Subject: [PATCH] edit username will edit on plan --- system/controllers/accounts.php | 4 ---- system/controllers/customers.php | 7 +------ 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/system/controllers/accounts.php b/system/controllers/accounts.php index 70443f05..0e0c74cf 100644 --- a/system/controllers/accounts.php +++ b/system/controllers/accounts.php @@ -45,10 +45,6 @@ switch ($action) { if ($_app_stage != 'demo') { if (file_exists($dvc)) { require_once $dvc; - $exp = $p['plan_expired']; - $p['plan_expired'] = 0; - (new $p['device'])->remove_customer($user, $p); - $p['plan_expired'] = $exp; (new $p['device'])->add_customer($user, $p); } else { new Exception(Lang::T("Devices Not Found")); diff --git a/system/controllers/customers.php b/system/controllers/customers.php index e84c1f51..ca95cce5 100644 --- a/system/controllers/customers.php +++ b/system/controllers/customers.php @@ -577,12 +577,7 @@ switch ($action) { if (file_exists($dvc)) { require_once $dvc; if ($userDiff) { - $c['username'] = $oldusername; - $exp = $p['plan_expired']; - $p['plan_expired'] = 0; - (new $p['device'])->remove_customer($c, $p); - $c['username'] = $username; - $p['plan_expired'] = $exp; + (new $p['device'])->change_username($p, $oldusername, $username); } (new $p['device'])->add_customer($c, $p); } else {