1
0
Fork 0
mirror of synced 2024-07-01 04:30:59 +12:00

refactor: fix formatting issues

This commit is contained in:
Damodar Lohani 2022-12-18 06:31:14 +00:00
parent 6612e6edf0
commit 4abc30eed1
4 changed files with 15 additions and 17 deletions

View file

@ -1532,8 +1532,7 @@ App::patch('/v1/account/password')
$history = $user->getAttribute('passwordHistory', []);
foreach ($history as $hash) {
if(Auth::passwordVerify($password, $hash, $user->getAttribute('hash'), $user->getAttribute('hashOptions')))
{
if (Auth::passwordVerify($password, $hash, $user->getAttribute('hash'), $user->getAttribute('hashOptions'))) {
throw new Exception(Exception::USER_PASSWORD_RECENTLY_USED, 'The password was recently used', 409);
}
}

View file

@ -811,8 +811,7 @@ App::patch('/v1/users/:userId/password')
$history = $user->getAttribute('passwordHistory', []);
foreach ($history as $hash) {
if(Auth::passwordVerify($password, $hash, $user->getAttribute('hash'), $user->getAttribute('hashOptions')))
{
if (Auth::passwordVerify($password, $hash, $user->getAttribute('hash'), $user->getAttribute('hashOptions'))) {
throw new Exception(Exception::USER_PASSWORD_RECENTLY_USED, 'The password was recently used', 409);
}
}