|
|
@ -195,7 +195,7 @@ func SignInPost(ctx *context.Context) { |
|
|
|
form := web.GetForm(ctx).(*forms.SignInForm) |
|
|
|
form := web.GetForm(ctx).(*forms.SignInForm) |
|
|
|
u, source, err := auth_service.UserSignIn(form.UserName, form.Password) |
|
|
|
u, source, err := auth_service.UserSignIn(form.UserName, form.Password) |
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|
if user_model.IsErrUserNotExist(err) { |
|
|
|
if user_model.IsErrUserNotExist(err) || user_model.IsErrEmailAddressNotExist(err) { |
|
|
|
ctx.RenderWithErr(ctx.Tr("form.username_password_incorrect"), tplSignIn, &form) |
|
|
|
ctx.RenderWithErr(ctx.Tr("form.username_password_incorrect"), tplSignIn, &form) |
|
|
|
log.Info("Failed authentication attempt for %s from %s: %v", form.UserName, ctx.RemoteAddr(), err) |
|
|
|
log.Info("Failed authentication attempt for %s from %s: %v", form.UserName, ctx.RemoteAddr(), err) |
|
|
|
} else if user_model.IsErrEmailAlreadyUsed(err) { |
|
|
|
} else if user_model.IsErrEmailAlreadyUsed(err) { |
|
|
|