Changeset View
Changeset View
Standalone View
Standalone View
src/app/Console/Development/UserStatus.php
Show First 20 Lines • Show All 42 Lines • ▼ Show 20 Lines | public function handle() | ||||
$this->info("Found user: {$user->id}"); | $this->info("Found user: {$user->id}"); | ||||
$statuses = [ | $statuses = [ | ||||
'active' => User::STATUS_ACTIVE, | 'active' => User::STATUS_ACTIVE, | ||||
'suspended' => User::STATUS_SUSPENDED, | 'suspended' => User::STATUS_SUSPENDED, | ||||
'deleted' => User::STATUS_DELETED, | 'deleted' => User::STATUS_DELETED, | ||||
'ldapReady' => User::STATUS_LDAP_READY, | 'ldapReady' => User::STATUS_LDAP_READY, | ||||
'imapReady' => User::STATUS_IMAP_READY, | 'imapReady' => User::STATUS_IMAP_READY, | ||||
'degraded' => User::STATUS_DEGRADED, | |||||
]; | ]; | ||||
// I'd prefer "-state" and "+state" syntax, but it's not possible | // I'd prefer "-state" and "+state" syntax, but it's not possible | ||||
$delete = false; | $delete = false; | ||||
if ($update = $this->option('del')) { | if ($update = $this->option('del')) { | ||||
$delete = true; | $delete = true; | ||||
} elseif ($update = $this->option('add')) { | } elseif ($update = $this->option('add')) { | ||||
// do nothing | // do nothing | ||||
Show All 28 Lines |