feat(user): implement session deletion on password reset

This commit is contained in:
Andras Bacsai
2025-03-21 15:45:29 +01:00
parent 26f4d37346
commit d7d80e926e
6 changed files with 48 additions and 10 deletions

View File

@@ -39,7 +39,8 @@ class RootResetPassword extends Command
}
$this->info('Updating root password...');
try {
User::find(0)->update(['password' => Hash::make($password)]);
$user = User::find(0);
$user->update(['password' => Hash::make($password)]);
$this->info('Root password updated successfully.');
} catch (\Exception $e) {
$this->error('Failed to update root password.');