From 42b8ef1610748f55df240d5fabde4dfcb24ebbbd Mon Sep 17 00:00:00 2001 From: Miguel Serrano Date: Tue, 31 Oct 2023 13:15:24 +0100 Subject: [PATCH] Merge pull request #15405 from overleaf/msm-remove-redundant-check [web] Remove redundant check GitOrigin-RevId: 035adf436c0d694fcb7817cd27e743683eb1252d --- services/web/app/src/Features/User/SAMLIdentityManager.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/services/web/app/src/Features/User/SAMLIdentityManager.js b/services/web/app/src/Features/User/SAMLIdentityManager.js index 94dea9aeb0..38bc2d41f6 100644 --- a/services/web/app/src/Features/User/SAMLIdentityManager.js +++ b/services/web/app/src/Features/User/SAMLIdentityManager.js @@ -157,9 +157,7 @@ async function _addInstitutionEmail(userId, email, providerId, auditLog) { throw new Errors.NotFoundError('user not found') } const emailAlreadyAssociated = user.emails.find(e => e.email === email) - if (emailAlreadyAssociated && emailAlreadyAssociated.confirmedAt) { - await UserUpdater.promises.updateUser(query, update) - } else if (emailAlreadyAssociated) { + if (emailAlreadyAssociated) { await UserUpdater.promises.updateUser(query, update) } else { await UserUpdater.promises.addEmailAddress(