1
0
Fork 0
forked from forgejo/forgejo

update #9066 Always show Password field on link account sign in page (#9147)

This commit is contained in:
Benno 2019-11-25 04:17:53 +08:00 committed by techknowlogick
parent d0edb607a3
commit e8241bf55e
2 changed files with 2 additions and 1 deletions

View file

@ -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)