fix: restore soft-deleted users on login
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user