fix: remove hardcode, reuse hasher

This commit is contained in:
Damodar Lohani
2025-09-14 05:02:50 +00:00
parent 3b668f7806
commit d42841d80a
+2 -6
View File
@@ -1402,12 +1402,8 @@ App::patch('/v1/users/:userId/password')
->setAttribute('password', $newPassword)
->setAttribute('passwordHistory', $history)
->setAttribute('passwordUpdate', DateTime::now())
->setAttribute('hash', 'argon2')
->setAttribute('hashOptions', [
'memoryCost' => 65536,
'timeCost' => 4,
'threads' => 3
]);
->setAttribute('hash', $hasher->getName())
->setAttribute('hashOptions', $hasher->getOptions());
$user = $dbForProject->updateDocument('users', $user->getId(), $user);