1
0
Fork 0
forked from forgejo/forgejo

Fix database inconsistent when admin change user email (#17549)

This commit is contained in:
Lunny Xiao 2021-11-26 09:56:16 +08:00 committed by GitHub
parent f23851f690
commit 371ebce252
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 62 additions and 15 deletions

View file

@ -74,7 +74,7 @@ func UpdateUserSettings(ctx *context.APIContext) {
ctx.User.KeepActivityPrivate = *form.HideActivity
}
if err := user_model.UpdateUser(ctx.User); err != nil {
if err := user_model.UpdateUser(ctx.User, false); err != nil {
ctx.InternalServerError(err)
return
}