From 32d1580b363aecb2f45d861aefd92c80c80a3756 Mon Sep 17 00:00:00 2001 From: ychao_1983 Date: Mon, 23 Aug 2021 10:51:57 +0800 Subject: [PATCH] =?UTF-8?q?#282=20=E9=82=AE=E4=BB=B6=E5=9C=B0=E5=9D=80?= =?UTF-8?q?=E5=B7=B2=E8=A2=AB=E4=BD=BF=E7=94=A8=EF=BC=8C=E7=95=8C=E9=9D=A2?= =?UTF-8?q?=E5=B7=B2=E7=BB=8F=E4=B8=8D=E8=83=BD=E4=BF=AE=E6=94=B9=E9=82=AE?= =?UTF-8?q?=E4=BB=B6=E5=9C=B0=E5=9D=80=EF=BC=8C=E5=8E=BB=E6=8E=89=E9=82=AE?= =?UTF-8?q?=E4=BB=B6=E7=9A=84=E6=A3=80=E6=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- routers/user/setting/profile.go | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/routers/user/setting/profile.go b/routers/user/setting/profile.go index a385f2cac..3333a8cc4 100755 --- a/routers/user/setting/profile.go +++ b/routers/user/setting/profile.go @@ -90,23 +90,12 @@ func ProfilePost(ctx *context.Context, form auth.UpdateProfileForm) { } ctx.User.FullName = form.FullName - ctx.User.Email = form.Email + ctx.User.KeepEmailPrivate = form.KeepEmailPrivate ctx.User.Website = form.Website ctx.User.Location = form.Location ctx.User.Language = form.Language ctx.User.Description = form.Description - isUsed, err := models.IsEmailUsed(form.Email) - if err != nil { - ctx.ServerError("IsEmailUsed", err) - return - } - - if isUsed { - ctx.Flash.Error(ctx.Tr("form.email_been_used")) - ctx.Redirect(setting.AppSubURL + "/user/settings") - return - } if err := models.UpdateUserSetting(ctx.User); err != nil { if _, ok := err.(models.ErrEmailAlreadyUsed); ok {