summaryrefslogtreecommitdiffstats
path: root/routers/user
diff options
context:
space:
mode:
authorUnknown <joe2010xtmf@163.com>2014-03-16 10:35:25 -0400
committerUnknown <joe2010xtmf@163.com>2014-03-16 10:35:25 -0400
commit425a58afd662297a1697349890f8611cf79d2019 (patch)
tree2fc3d2b4d63575baf6f56096fb1887b786dff0ea /routers/user
parentf6e32b1b08a5eff2c0cbdfe827b40fdea9dc676e (diff)
downloadgitea-425a58afd662297a1697349890f8611cf79d2019.tar.gz
gitea-425a58afd662297a1697349890f8611cf79d2019.zip
Bug fix
Diffstat (limited to 'routers/user')
-rw-r--r--routers/user/user.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/routers/user/user.go b/routers/user/user.go
index ad84ff6c79..0ff5058dcc 100644
--- a/routers/user/user.go
+++ b/routers/user/user.go
@@ -157,11 +157,11 @@ func Delete(ctx *middleware.Context) {
return
}
- rawPasswd := ctx.Query("password")
- encodedPwd, _ := models.EncodePasswd(rawPasswd)
- if len(encodedPwd) == 0 || encodedPwd != ctx.User.Passwd {
+ tmpUser := models.User{Passwd: ctx.Query("password")}
+ tmpUser.EncodePasswd()
+ if len(tmpUser.Passwd) == 0 || tmpUser.Passwd != ctx.User.Passwd {
ctx.Data["HasError"] = true
- ctx.Data["ErrorMsg"] = "Your password error. Make sure you are owner of this account."
+ ctx.Data["ErrorMsg"] = "Password is not correct. Make sure you are owner of this account."
} else {
if err := models.DeleteUser(ctx.User); err != nil {
ctx.Data["HasError"] = true