Fix Logic Banned user

This commit is contained in:
Ibnu Maksum 2024-05-17 19:05:16 +07:00
parent b5a9190ae7
commit 51c4909308
No known key found for this signature in database
GPG Key ID: 7FC82848810579E5
5 changed files with 10 additions and 8 deletions

View File

@ -163,7 +163,7 @@ class User
$id = User::getID();
}
$d = ORM::for_table('tbl_customers')->find_one($id);
if ($d['status'] != 'Banned') {
if ($d['status'] == 'Banned') {
_alert(Lang::T('This account status') . ' : ' . Lang::T($d['status']), 'danger', "logout");
}
if (empty($d['username'])) {

View File

@ -18,7 +18,7 @@ if (isset($_GET['renewal'])) {
if (_post('send') == 'balance') {
if ($config['enable_balance'] == 'yes' && $config['allow_balance_transfer'] == 'yes') {
if ($user['status'] != 'Active') {
if ($user['status'] == 'Disabled') {
_alert(Lang::T('This account status') . ' : ' . Lang::T($user['status']), 'danger', "");
}
$target = ORM::for_table('tbl_customers')->where('username', _post('username'))->find_one();
@ -80,7 +80,7 @@ if (_post('send') == 'balance') {
r2(U . 'home', 'd', Lang::T('Failed, balance is not available'));
}
} else if (_post('send') == 'plan') {
if ($user['status'] != 'Active') {
if ($user['status'] == 'Disabled') {
_alert(Lang::T('This account status') . ' : ' . Lang::T($user['status']), 'danger', "");
}
$actives = ORM::for_table('tbl_user_recharges')
@ -98,7 +98,7 @@ if (_post('send') == 'balance') {
$ui->assign('_bills', User::_billing());
if (isset($_GET['recharge']) && !empty($_GET['recharge'])) {
if ($user['status'] != 'Active') {
if ($user['status'] == 'Disabled') {
_alert(Lang::T('This account status') . ' : ' . Lang::T($user['status']), 'danger', "");
}
if (!empty(App::getTokenValue(_get('stoken')))) {
@ -128,7 +128,7 @@ if (isset($_GET['recharge']) && !empty($_GET['recharge'])) {
}
}
} else if (!empty(_get('extend'))) {
if ($user['status'] != 'Active') {
if ($user['status'] == 'Disabled') {
_alert(Lang::T('This account status') . ' : ' . Lang::T($user['status']), 'danger', "");
}
if (!$config['extend_expired']) {

View File

@ -24,7 +24,7 @@ switch ($do) {
$d = ORM::for_table('tbl_customers')->where('username', $username)->find_one();
if ($d) {
$d_pass = $d['password'];
if ($d['status'] != 'Banned') {
if ($d['status'] == 'Banned') {
_alert(Lang::T('This account status') . ' : ' . Lang::T($d['status']), 'danger', "");
}
if (Password::_uverify($password, $d_pass) == true) {

View File

@ -472,5 +472,7 @@
"SMS": "SMS",
"WhatsApp": "WhatsApp",
"SMS_and_WhatsApp": "SMS dan WhatsApp",
"The_method_which_OTP_will_be_sent_to_user": "Metode OTP yang akan dikirimkan ke pengguna"
"The_method_which_OTP_will_be_sent_to_user": "Metode OTP yang akan dikirimkan ke pengguna",
"Disabled": "Dinonaktifkan",
"Banned": "Banned"
}

View File

@ -1,3 +1,3 @@
{
"version": "2024.5.17"
"version": "2024.5.17.1"
}