From 3f26e66d267fd9cd9b82a5c0e39900a5ec7431d9 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Sun, 18 Dec 2022 08:35:12 +0000 Subject: [PATCH] not add random password to history --- app/controllers/api/teams.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/app/controllers/api/teams.php b/app/controllers/api/teams.php index 7775346a8a..567560c6a8 100644 --- a/app/controllers/api/teams.php +++ b/app/controllers/api/teams.php @@ -345,8 +345,6 @@ App::post('/v1/teams/:teamId/memberships') } } - $passwordHistory = $project->getAttribute('auths', [])['passwordHistory'] ?? 0; - try { $userId = ID::unique(); $invitee = Authorization::skip(fn() => $dbForProject->createDocument('users', new Document([ @@ -360,7 +358,6 @@ App::post('/v1/teams/:teamId/memberships') 'email' => $email, 'emailVerification' => false, 'status' => true, - 'passwordHistory' => $passwordHistory > 0 ? [Auth::passwordHash(Auth::passwordGenerator(), Auth::DEFAULT_ALGO, Auth::DEFAULT_ALGO_OPTIONS)] : [], 'password' => Auth::passwordHash(Auth::passwordGenerator(), Auth::DEFAULT_ALGO, Auth::DEFAULT_ALGO_OPTIONS), 'hash' => Auth::DEFAULT_ALGO, 'hashOptions' => Auth::DEFAULT_ALGO_OPTIONS,