edit username will edit on plan

This commit is contained in:
Ibnu Maksum 2024-07-18 09:52:53 +07:00
parent 938173cab7
commit 847f074a6b
No known key found for this signature in database
GPG Key ID: 7FC82848810579E5
2 changed files with 1 additions and 10 deletions

View File

@ -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"));

View File

@ -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 {