mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Fix PHP refference bug
This commit is contained in:
@@ -119,7 +119,7 @@ App::post('/v1/account')
|
||||
}
|
||||
}
|
||||
|
||||
$hooks->trigger('passwordValidator', [$project, $password, $user]);
|
||||
$hooks->trigger('passwordValidator', [$project, $password, &$user]);
|
||||
|
||||
$passwordHistory = $project->getAttribute('auths', [])['passwordHistory'] ?? 0;
|
||||
$password = Auth::passwordHash($password, Auth::DEFAULT_ALGO, Auth::DEFAULT_ALGO_OPTIONS);
|
||||
@@ -1915,7 +1915,7 @@ App::patch('/v1/account/password')
|
||||
}
|
||||
}
|
||||
|
||||
$hooks->trigger('passwordValidator', [$project, $password, $user]);
|
||||
$hooks->trigger('passwordValidator', [$project, $password, &$user]);
|
||||
|
||||
$user
|
||||
->setAttribute('password', $newPassword)
|
||||
|
||||
@@ -99,7 +99,7 @@ function createUser(string $hash, mixed $hashOptions, string $userId, ?string $e
|
||||
'search' => implode(' ', [$userId, $email, $phone, $name]),
|
||||
]);
|
||||
|
||||
$hooks->trigger('passwordValidator', [$project, $password, $user]);
|
||||
$hooks->trigger('passwordValidator', [$project, $password, &$user]);
|
||||
|
||||
$password = (!empty($password)) ? ($hash === 'plaintext' ? Auth::passwordHash($password, $hash, $hashOptionsObject) : $password) : null;
|
||||
$user = $dbForProject->createDocument('users', $user);
|
||||
@@ -875,7 +875,7 @@ App::patch('/v1/users/:userId/password')
|
||||
}
|
||||
}
|
||||
|
||||
$hooks->trigger('passwordValidator', [$project, $password, $user]);
|
||||
$hooks->trigger('passwordValidator', [$project, $password, &$user]);
|
||||
|
||||
$newPassword = Auth::passwordHash($password, Auth::DEFAULT_ALGO, Auth::DEFAULT_ALGO_OPTIONS);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user