mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-01 04:12:10 +00:00
Bug fix
This commit is contained in:
parent
f6e32b1b08
commit
425a58afd6
4 changed files with 17 additions and 17 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue