banned customer will automatically logout

This commit is contained in:
Ibnu Maksum
2024-05-17 09:20:53 +07:00
parent 9521e96495
commit f81feee9c0
2 changed files with 9 additions and 7 deletions

View File

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