Skip to content

Commit

Permalink
fix: 临时修复用户未激活的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
dragove committed Apr 13, 2024
1 parent 938f401 commit 6921a84
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main/kotlin/plus/maa/backend/service/UserService.kt
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ class UserService(
}
// 修改密码的逻辑,应当使用与 authentication provider 一致的编码器
maaUser.password = passwordEncoder.encode(rawPassword)
// 更新密码时,如果用户未启用则自动启用
if (maaUser.status == 0) {
maaUser.status = 1
}
maaUser.refreshJwtIds = ArrayList()
userRepository.save(maaUser)
}
Expand Down

0 comments on commit 6921a84

Please sign in to comment.