Fix Demo mode
This commit is contained in:
@ -44,11 +44,13 @@ switch ($action) {
|
||||
// if has active plan, change the password to devices
|
||||
$p = ORM::for_table('tbl_plans')->where('id', $c['plan_id'])->find_one();
|
||||
$dvc = Package::getDevice($p);
|
||||
if (file_exists($dvc) && $_app_stage != 'demo') {
|
||||
require_once $dvc;
|
||||
(new $p['device'])->remove_customer($c, $p);
|
||||
} else {
|
||||
new Exception(Lang::T("Devices Not Found"));
|
||||
if ($_app_stage != 'demo') {
|
||||
if (file_exists($dvc)) {
|
||||
require_once $dvc;
|
||||
(new $p['device'])->remove_customer($c, $p);
|
||||
} else {
|
||||
new Exception(Lang::T("Devices Not Found"));
|
||||
}
|
||||
}
|
||||
}
|
||||
$d->password = $npass;
|
||||
|
Reference in New Issue
Block a user