fix: clear code after used

This commit is contained in:
Raymond 2025-07-30 18:20:04 -04:00 committed by Azalea
parent 7b21a38e17
commit 2431bd09af

View File

@ -202,6 +202,9 @@ class UserRegistrar(
// Change the password
async { userRepo.save(reset.aquaNetUser.apply { pwHash = validator.checkPwHash(password) }) }
// Remove the token from the list
resetPasswordRepo.delete(reset)
// Clear all sessions
sessionRepo.deleteAll(
sessionRepo.findByAquaNetUserAuId(reset.aquaNetUser.auId)