mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
fix: remove hardcode, reuse hasher
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user