updating create user and reset password with new return constants
This commit is contained in:
parent
27032f433a
commit
fdba9f1ae7
@ -52,7 +52,7 @@ class CreateUser extends Command
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
$this->info("$email created successfully.");
|
$this->info("$email created successfully.");
|
||||||
return 0;
|
return Command::SUCCESS;
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
$this->error('Unable to create your user.');
|
$this->error('Unable to create your user.');
|
||||||
$this->line($e->getMessage());
|
$this->line($e->getMessage());
|
||||||
|
@ -52,7 +52,7 @@ class ResetPassword extends Command
|
|||||||
$column = 'email';
|
$column = 'email';
|
||||||
$value = $email;
|
$value = $email;
|
||||||
} else {
|
} else {
|
||||||
$column = strtolower($this->choice('What column would you like to search by?', ['ID', 'Email']));
|
$column = strtolower($this->choice('What database column would you like to search by?', ['ID', 'Email']));
|
||||||
$value = $this->ask("Please provide an $column to search for");
|
$value = $this->ask("Please provide an $column to search for");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -68,7 +68,7 @@ class ResetPassword extends Command
|
|||||||
try {
|
try {
|
||||||
$user->update(['password' => Hash::make($password)]);
|
$user->update(['password' => Hash::make($password)]);
|
||||||
$this->info("User {$user->id} ({$user->email}) password update successful!");
|
$this->info("User {$user->id} ({$user->email}) password update successful!");
|
||||||
return 0;
|
return Command::SUCCESS;
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
$this->error('Unable to set the password!');
|
$this->error('Unable to set the password!');
|
||||||
$this->line($e->getMessage());
|
$this->line($e->getMessage());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user