1
1
mirror of https://github.com/go-gitea/gitea synced 2025-08-09 11:08:19 +00:00

backport v1.10 - Always show Password field on link account sign in page (#9150)

This commit is contained in:
Benno
2019-11-25 07:38:05 +08:00
committed by techknowlogick
parent 1270e2ad85
commit c01afd584d
2 changed files with 2 additions and 1 deletions

View File

@@ -786,6 +786,7 @@ func LinkAccountPostSignIn(ctx *context.Context, signInForm auth.SignInForm) {
u, err := models.UserSignIn(signInForm.UserName, signInForm.Password)
if err != nil {
if models.IsErrUserNotExist(err) {
ctx.Data["user_exists"] = true
ctx.RenderWithErr(ctx.Tr("form.username_password_incorrect"), tplLinkAccount, &signInForm)
} else {
ctx.ServerError("UserLinkAccount", err)