This commit is contained in:
parent
d0edb607a3
commit
e8241bf55e
2 changed files with 2 additions and 1 deletions
|
@ -788,6 +788,7 @@ func LinkAccountPostSignIn(ctx *context.Context, signInForm auth.SignInForm) {
|
||||||
u, err := models.UserSignIn(signInForm.UserName, signInForm.Password)
|
u, err := models.UserSignIn(signInForm.UserName, signInForm.Password)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if models.IsErrUserNotExist(err) {
|
if models.IsErrUserNotExist(err) {
|
||||||
|
ctx.Data["user_exists"] = true
|
||||||
ctx.RenderWithErr(ctx.Tr("form.username_password_incorrect"), tplLinkAccount, &signInForm)
|
ctx.RenderWithErr(ctx.Tr("form.username_password_incorrect"), tplLinkAccount, &signInForm)
|
||||||
} else {
|
} else {
|
||||||
ctx.ServerError("UserLinkAccount", err)
|
ctx.ServerError("UserLinkAccount", err)
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
<label for="user_name">{{.i18n.Tr "home.uname_holder"}}</label>
|
<label for="user_name">{{.i18n.Tr "home.uname_holder"}}</label>
|
||||||
<input id="user_name" name="user_name" value="{{.user_name}}" autofocus required>
|
<input id="user_name" name="user_name" value="{{.user_name}}" autofocus required>
|
||||||
</div>
|
</div>
|
||||||
{{if not .DisablePassword}}
|
{{if or (not .DisablePassword) .LinkAccountMode}}
|
||||||
<div class="required inline field {{if and (.Err_Password) (or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeSignIn))}}error{{end}}">
|
<div class="required inline field {{if and (.Err_Password) (or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeSignIn))}}error{{end}}">
|
||||||
<label for="password">{{.i18n.Tr "password"}}</label>
|
<label for="password">{{.i18n.Tr "password"}}</label>
|
||||||
<input id="password" name="password" type="password" value="{{.password}}" autocomplete="off" required>
|
<input id="password" name="password" type="password" value="{{.password}}" autocomplete="off" required>
|
||||||
|
|
Loading…
Reference in a new issue