parent
ddb0287bf6
commit
e8e56da9ac
2 changed files with 28 additions and 13 deletions
|
@ -104,7 +104,7 @@ func SettingsPost(ctx *context.Context, form auth.UpdateProfileForm) {
|
|||
ctx.User.KeepEmailPrivate = form.KeepEmailPrivate
|
||||
ctx.User.Website = form.Website
|
||||
ctx.User.Location = form.Location
|
||||
if err := models.UpdateUser(ctx.User); err != nil {
|
||||
if err := models.UpdateUserSetting(ctx.User); err != nil {
|
||||
if _, ok := err.(models.ErrEmailAlreadyUsed); ok {
|
||||
ctx.Flash.Error(ctx.Tr("form.email_been_used"))
|
||||
ctx.Redirect(setting.AppSubURL + "/user/settings")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue