fix: restore soft-deleted users on login

This commit is contained in:
2026-06-15 07:36:13 +08:00
parent 04d30f9dd1
commit 346cf0e4a6
13 changed files with 234 additions and 37 deletions
+5
View File
@@ -141,6 +141,11 @@ func OidcAuth(c *gin.Context) {
})
return
}
if err := user.RestoreIfDeleted("oidc", c.ClientIP()); err != nil {
common.SysError(fmt.Sprintf("failed to restore user %d: %v", user.Id, err))
common.ApiError(c, err)
return
}
} else {
if common.RegisterEnabled {
user.Email = oidcUser.Email