diff options
author | Unknwon <u@gogs.io> | 2015-03-26 17:11:47 -0400 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2015-03-26 17:11:47 -0400 |
commit | 698b9e2acc4daafe7d2b314e2d8c96545dde9c40 (patch) | |
tree | 8d593bb0816503494de4deb16ee0fa6b95eb3c5c /routers/org/setting.go | |
parent | d76f11c6f14b69bf981e5fc3901cc2c6445773b8 (diff) | |
download | gitea-698b9e2acc4daafe7d2b314e2d8c96545dde9c40.tar.gz gitea-698b9e2acc4daafe7d2b314e2d8c96545dde9c40.zip |
#1070 Clearer error message for illegal characters
Diffstat (limited to 'routers/org/setting.go')
-rw-r--r-- | routers/org/setting.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/org/setting.go b/routers/org/setting.go index 8bc6a2a96a..7a76199502 100644 --- a/routers/org/setting.go +++ b/routers/org/setting.go @@ -68,7 +68,7 @@ func SettingsPost(ctx *middleware.Context, form auth.UpdateOrgSettingForm) { org.Avatar = base.EncodeMd5(form.Avatar) org.AvatarEmail = form.Avatar if err := models.UpdateUser(org); err != nil { - if err == models.ErrEmailAlreadyUsed { + if models.IsErrEmailAlreadyUsed(err) { ctx.Data["Err_Email"] = true ctx.RenderWithErr(ctx.Tr("form.email_been_used"), SETTINGS_OPTIONS, &form) } else { |