mirror of
https://github.com/hotspotbilling/phpnuxbill.git
synced 2025-08-09 20:55:28 +02:00
banned customer will automatically logout
This commit is contained in:
parent
9521e96495
commit
f81feee9c0
2 changed files with 9 additions and 7 deletions
|
@ -163,7 +163,9 @@ class User
|
||||||
$id = User::getID();
|
$id = User::getID();
|
||||||
}
|
}
|
||||||
$d = ORM::for_table('tbl_customers')->find_one($id);
|
$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'])) {
|
if (empty($d['username'])) {
|
||||||
r2(U . 'logout', 'd', '');
|
r2(U . 'logout', 'd', '');
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,7 +25,7 @@ switch ($do) {
|
||||||
if ($d) {
|
if ($d) {
|
||||||
$d_pass = $d['password'];
|
$d_pass = $d['password'];
|
||||||
if ($d['status'] != 'Banned') {
|
if ($d['status'] != 'Banned') {
|
||||||
_alert(Lang::T('This account status').' : '.Lang::T($c['status']),'danger', "");
|
_alert(Lang::T('This account status') . ' : ' . Lang::T($d['status']), 'danger', "");
|
||||||
}
|
}
|
||||||
if (Password::_uverify($password, $d_pass) == true) {
|
if (Password::_uverify($password, $d_pass) == true) {
|
||||||
$_SESSION['uid'] = $d['id'];
|
$_SESSION['uid'] = $d['id'];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue