aboutsummaryrefslogtreecommitdiff
path: root/routers/user/user.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2014-03-16 23:03:27 +0800
committerLunny Xiao <xiaolunwen@gmail.com>2014-03-16 23:03:27 +0800
commit015174484a3aa430e30801e0c3c5ce0bdc4a5bf5 (patch)
tree998a2362f2d8ba7f22f1a0bb55bb70cf6f3988c0 /routers/user/user.go
parent1fb457ac1f46ef07557f5c8c5b84438f2325a5cf (diff)
parent9249ceaff2802ab571f163a9a163b716e5ee26cc (diff)
Merge branch 'master' of github.com:gogits/gogs
Diffstat (limited to 'routers/user/user.go')
-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 ad84ff6c..0ff5058d 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