Improve admin user field is_deletable to check user.account_removed
This commit is contained in:
parent
8a055902f4
commit
a35707ec8f
|
@ -120,7 +120,7 @@ abstract class BaseUsers extends BaseAdmin
|
|||
$user['login_date'] = Temporal::getRelativeDate($user['login_date']);
|
||||
$user['lastitem_date'] = Temporal::getRelativeDate($user['last-item']);
|
||||
$user['is_admin'] = in_array($user['email'], $adminlist);
|
||||
$user['is_deletable'] = (intval($user['uid']) != local_user());
|
||||
$user['is_deletable'] = !$user['account_removed'] && intval($user['uid']) != local_user();
|
||||
$user['deleted'] = ($user['account_removed'] ? Temporal::getRelativeDate($user['account_expires_on']) : False);
|
||||
|
||||
return $user;
|
||||
|
|
Loading…
Reference in New Issue
Block a user