From 425a58afd662297a1697349890f8611cf79d2019 Mon Sep 17 00:00:00 2001 From: Unknown Date: Sun, 16 Mar 2014 10:35:25 -0400 Subject: Bug fix --- routers/user/user.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'routers/user/user.go') 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 -- cgit v1.2.3