fix: restore soft-deleted users on login
This commit is contained in:
@@ -139,6 +139,11 @@ func DiscordOAuth(c *gin.Context) {
|
||||
})
|
||||
return
|
||||
}
|
||||
if err := user.RestoreIfDeleted("discord", 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 {
|
||||
if discordUser.ID != "" {
|
||||
|
||||
Reference in New Issue
Block a user