fix: clear sessions upon password reset

This commit is contained in:
Raymond
2025-07-31 17:56:47 +09:00
committed by Azalea
parent 92868201a3
commit bf51f48961
@@ -202,6 +202,11 @@ class UserRegistrar(
// Change the password
async { userRepo.save(reset.aquaNetUser.apply { pwHash = validator.checkPwHash(password) }) }
// Clear all sessions
sessionRepo.deleteAll(
sessionRepo.findByAquaNetUserAuId(reset.aquaNetUser.auId)
)
return SUCCESS
}