From fdba9f1ae7fba47e5acbc1b174d384261c4c64a3 Mon Sep 17 00:00:00 2001 From: Brian Rogers Date: Wed, 7 Dec 2022 11:42:12 -0700 Subject: [PATCH] updating create user and reset password with new return constants --- src/app/Console/Commands/CreateUser.php | 2 +- src/app/Console/Commands/ResetPassword.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/Console/Commands/CreateUser.php b/src/app/Console/Commands/CreateUser.php index e3e9634..aa76ad1 100644 --- a/src/app/Console/Commands/CreateUser.php +++ b/src/app/Console/Commands/CreateUser.php @@ -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()); diff --git a/src/app/Console/Commands/ResetPassword.php b/src/app/Console/Commands/ResetPassword.php index 11699c3..d91dc98 100644 --- a/src/app/Console/Commands/ResetPassword.php +++ b/src/app/Console/Commands/ResetPassword.php @@ -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());