diff --git a/routers/user/auth.go b/routers/user/auth.go index 1596e11bbbc0..258b5e03d79a 100644 --- a/routers/user/auth.go +++ b/routers/user/auth.go @@ -788,6 +788,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) diff --git a/templates/user/auth/signin_inner.tmpl b/templates/user/auth/signin_inner.tmpl index 90519c439c76..9850058e5eaf 100644 --- a/templates/user/auth/signin_inner.tmpl +++ b/templates/user/auth/signin_inner.tmpl @@ -15,7 +15,7 @@ - {{if not .DisablePassword}} + {{if or (not .DisablePassword) .LinkAccountMode}}