Changeset View
Changeset View
Standalone View
Standalone View
src/app/Console/Commands/UserAddAlias.php
Show All 32 Lines | class UserAddAlias extends Command | ||||
/** | /** | ||||
* Execute the console command. | * Execute the console command. | ||||
* | * | ||||
* @return mixed | * @return mixed | ||||
*/ | */ | ||||
public function handle() | public function handle() | ||||
{ | { | ||||
$user = \App\User::where('email', $this->argument('user'))->first(); | $user = \App\User::withEnvTenant()->where('email', $this->argument('user'))->first(); | ||||
if (!$user) { | if (!$user) { | ||||
return 1; | return 1; | ||||
} | } | ||||
$alias = \strtolower($this->argument('alias')); | $alias = \strtolower($this->argument('alias')); | ||||
// Check if the alias already exists | // Check if the alias already exists | ||||
Show All 20 Lines |