Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2571569
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/src/app/Console/Commands/User/StatusCommand.php b/src/app/Console/Commands/User/StatusCommand.php
index 21eadbfe..83c989be 100644
--- a/src/app/Console/Commands/User/StatusCommand.php
+++ b/src/app/Console/Commands/User/StatusCommand.php
@@ -1,63 +1,64 @@
<?php
namespace App\Console\Commands\User;
use App\Console\Command;
use App\User;
class StatusCommand extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'user:status {user}';
/**
* The console command description.
*
* @var string
*/
protected $description = "Show a user's status.";
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
$user = $this->getUser($this->argument('user'), true);
if (!$user) {
$this->error("User not found.");
return 1;
}
$statuses = [
'active' => User::STATUS_ACTIVE,
'suspended' => User::STATUS_SUSPENDED,
'deleted' => User::STATUS_DELETED,
'ldapReady' => User::STATUS_LDAP_READY,
'imapReady' => User::STATUS_IMAP_READY,
'degraded' => User::STATUS_DEGRADED,
+ 'restricted' => User::STATUS_RESTRICTED,
];
$user_state = [];
foreach ($statuses as $text => $bit) {
if ($text == 'deleted') {
$status = $user->trashed();
} else {
$status = $user->{'is' . \ucfirst($text)}();
}
if ($status) {
$user_state[] = "$text ($bit)";
}
}
$this->info("Status ({$user->status}): " . \implode(', ', $user_state));
}
}
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Thu, Mar 19, 8:45 AM (20 h, 15 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
457552
Default Alt Text
(1 KB)
Attached To
Mode
R2 kolab
Attached
Detach File
Event Timeline
Log In to Comment