Skip to content
This repository was archived by the owner on Dec 9, 2025. It is now read-only.

Commit 6c6a043

Browse files
committed
reset 2fa if user reset password
1 parent 7649da1 commit 6c6a043

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/main/java/com/appirio/tech/core/service/identity/dao/UserDAO.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ public abstract class UserDAO implements DaoBase<User>, Transactional<UserDAO> {
156156

157157
@SqlUpdate(
158158
"UPDATE common_oltp.user_2fa SET " +
159-
"enabled=:enabled " +
159+
"enabled=:enabled, " +
160160
"verified=:verified " +
161161
"WHERE id=:id")
162162
public abstract int update2fa(@Bind("id") long id, @Bind("enabled") boolean enabled, @Bind("verified") boolean verified);

src/main/java/com/appirio/tech/core/service/identity/resource/UserResource.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -897,6 +897,7 @@ public ApiResponse changePassword(
897897

898898
logger.debug(String.format("Auth0: updating password for user: %s", dbUser.getHandle()));
899899
userDao.updatePassword(dbUser);
900+
userDao.update2fa(Utils.toLongValue(dbUser.getId()), false, false);
900901

901902
return ApiResponseFactory.createResponse("password updated successfully.");
902903
}

0 commit comments

Comments
 (0)