Show the disabled status of a user in the users:list command

This commit is contained in:
Jan Böhmer 2022-11-14 23:58:38 +01:00
parent 37fde77b8e
commit 27709bed60
3 changed files with 4 additions and 3 deletions

View file

@ -43,7 +43,7 @@ class UserListCommand extends Command
$io->title('Users:');
$table = new Table($output);
$table->setHeaders(['ID', 'Username', 'Name', 'Email', 'Group']);
$table->setHeaders(['ID', 'Username', 'Name', 'Email', 'Group', 'Login Disabled']);
foreach ($users as $user) {
$table->addRow([
@ -52,6 +52,7 @@ class UserListCommand extends Command
$user->getFullName(),
$user->getEmail(),
$user->getGroup() !== null ? $user->getGroup()->getName() . ' (ID: ' . $user->getGroup()->getID() . ')' : 'No group',
$user->isDisabled() ? 'Yes' : 'No',
]);
}