mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-17 04:15:02 +00:00
fix(console): handle missing root user in password reset command
This commit is contained in:
1 parent
e7f32a1c44
commit
cef4596011
3 files changed
+7
-2
No files matched your search
@@ -40,6 +40,11 @@ class RootResetPassword extends Command
|
||||
$this->info('Updating root password...');
|
||||
try {
|
||||
$user = User::find(0);
|
||||
if (! $user) {
|
||||
$this->error('Root user not found.');
|
||||
|
||||
return;
|
||||
}
|
||||
$user->update(['password' => Hash::make($password)]);
|
||||
$this->info('Root password updated successfully.');
|
||||
} catch (\Exception $e) {
|
||||
|
||||
Reference in new issue
Block a user