From 6548e84bd3e3e2699af0699e746424bf7de615f4 Mon Sep 17 00:00:00 2001 From: eisbilir Date: Wed, 12 Oct 2022 18:13:51 +0300 Subject: [PATCH] fix npe --- .../tech/core/service/identity/resource/UserResource.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/appirio/tech/core/service/identity/resource/UserResource.java b/src/main/java/com/appirio/tech/core/service/identity/resource/UserResource.java index f6668b1..92fc882 100644 --- a/src/main/java/com/appirio/tech/core/service/identity/resource/UserResource.java +++ b/src/main/java/com/appirio/tech/core/service/identity/resource/UserResource.java @@ -1643,7 +1643,7 @@ public ApiResponse updateUser2fa( && user2faInDb.getDiceEnabled() != null && user2faInDb.getDiceEnabled() == true)) { throw new APIRuntimeException(SC_BAD_REQUEST, "You cannot disable mfa"); } - if (user2fa.getMfaEnabled() && user2faInDb.getId() == null) { + if (user2faInDb.getId() == null) { if (userDao.getEmailCount(userId) > 1) { throw new APIRuntimeException(SC_BAD_REQUEST, "You have multiple accounts registered with same email. Please contact with support."); }