Changeset View
Changeset View
Standalone View
Standalone View
src/app/Console/Commands/UserStatus.php
Show All 32 Lines | class UserStatus extends Command | ||||
/** | /** | ||||
* Execute the console command. | * Execute the console command. | ||||
* | * | ||||
* @return mixed | * @return mixed | ||||
*/ | */ | ||||
public function handle() | public function handle() | ||||
{ | { | ||||
$user = User::where('email', $this->argument('user'))->first(); | $user = User::withEnvTenant()->where('email', $this->argument('user'))->first(); | ||||
if (!$user) { | if (!$user) { | ||||
return 1; | return 1; | ||||
} | } | ||||
$statuses = [ | $statuses = [ | ||||
'active' => User::STATUS_ACTIVE, | 'active' => User::STATUS_ACTIVE, | ||||
'suspended' => User::STATUS_SUSPENDED, | 'suspended' => User::STATUS_SUSPENDED, | ||||
Show All 14 Lines |