aboutsummaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
authorKN4CK3R <admin@oldschoolhack.me>2022-03-15 10:18:39 +0100
committerGitHub <noreply@github.com>2022-03-15 10:18:39 +0100
commitc88f2e2acce8240ddd2161644ac37db5b6ec1337 (patch)
tree6a0fcdf0ed9aabcf78abd293d8f670dcf5d3c92c /routers
parent2ba72cedbe814b39e84befdc4c9ec384d937c194 (diff)
downloadgitea-c88f2e2acce8240ddd2161644ac37db5b6ec1337.tar.gz
gitea-c88f2e2acce8240ddd2161644ac37db5b6ec1337.zip
Handle email address not exist. (#19089)
Diffstat (limited to 'routers')
-rw-r--r--routers/web/auth/auth.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/web/auth/auth.go b/routers/web/auth/auth.go
index 9209b7335e..64196e28cd 100644
--- a/routers/web/auth/auth.go
+++ b/routers/web/auth/auth.go
@@ -195,7 +195,7 @@ func SignInPost(ctx *context.Context) {
form := web.GetForm(ctx).(*forms.SignInForm)
u, source, err := auth_service.UserSignIn(form.UserName, form.Password)
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)
log.Info("Failed authentication attempt for %s from %s: %v", form.UserName, ctx.RemoteAddr(), err)
} else if user_model.IsErrEmailAlreadyUsed(err) {