updating create user and reset password with new return constants

This commit is contained in:
Brian 2022-12-07 11:42:12 -07:00
parent 27032f433a
commit fdba9f1ae7
Signed by: brian
GPG Key ID: DE1A5390A3B84CD8
2 changed files with 3 additions and 3 deletions

View File

@ -52,7 +52,7 @@ class CreateUser extends Command
]);
$this->info("$email created successfully.");
return 0;
return Command::SUCCESS;
} catch (\Exception $e) {
$this->error('Unable to create your user.');
$this->line($e->getMessage());

View File

@ -52,7 +52,7 @@ class ResetPassword extends Command
$column = 'email';
$value = $email;
} 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");
}
@ -68,7 +68,7 @@ class ResetPassword extends Command
try {
$user->update(['password' => Hash::make($password)]);
$this->info("User {$user->id} ({$user->email}) password update successful!");
return 0;
return Command::SUCCESS;
} catch (\Exception $e) {
$this->error('Unable to set the password!');
$this->line($e->getMessage());