fix: clear sessions upon password reset

This commit is contained in:
Raymond
2025-07-29 16:04:53 -04:00
committed by Azalea
parent 92868201a3
commit bf51f48961

View File

@@ -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
}