diff options
author | Unknown <joe2010xtmf@163.com> | 2014-07-12 00:55:19 -0400 |
---|---|---|
committer | Unknown <joe2010xtmf@163.com> | 2014-07-12 00:55:19 -0400 |
commit | 0f907301b7fbd05faf07bc22b3316ae1093c6724 (patch) | |
tree | 806e40ea6ef651e28563d09526377ed736528c10 /routers/user | |
parent | 63cc14062a891a99a429f2eef0ee90a3f5795f47 (diff) | |
download | gitea-0f907301b7fbd05faf07bc22b3316ae1093c6724.tar.gz gitea-0f907301b7fbd05faf07bc22b3316ae1093c6724.zip |
Fix #285
Diffstat (limited to 'routers/user')
-rw-r--r-- | routers/user/setting.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/routers/user/setting.go b/routers/user/setting.go index 8e4b0840c7..3ff8e21df3 100644 --- a/routers/user/setting.go +++ b/routers/user/setting.go @@ -47,13 +47,13 @@ func SettingPost(ctx *middleware.Context, form auth.UpdateProfileForm) { if ctx.User.Name != form.UserName { isExist, err := models.IsUserExist(form.UserName) if err != nil { - ctx.Handle(500, "user.Setting(update: check existence)", err) + ctx.Handle(500, "user.SettingPost(update: check existence)", err) return } else if isExist { - ctx.RenderWithErr("User name has been taken.", "user/setting", &form) + ctx.RenderWithErr("User name has been taken.", SETTING, &form) return } else if err = models.ChangeUserName(ctx.User, form.UserName); err != nil { - ctx.Handle(500, "user.Setting(change user name)", err) + ctx.Handle(500, "user.SettingPost(change user name)", err) return } log.Trace("%s User name changed: %s -> %s", ctx.Req.RequestURI, ctx.User.Name, form.UserName) @@ -68,7 +68,7 @@ func SettingPost(ctx *middleware.Context, form auth.UpdateProfileForm) { ctx.User.Avatar = base.EncodeMd5(form.Avatar) ctx.User.AvatarEmail = form.Avatar if err := models.UpdateUser(ctx.User); err != nil { - ctx.Handle(500, "setting.Setting(UpdateUser)", err) + ctx.Handle(500, "setting.SettingPost(UpdateUser)", err) return } log.Trace("%s User setting updated: %s", ctx.Req.RequestURI, ctx.User.LowerName) |