summaryrefslogtreecommitdiffstats
path: root/services/auth/signin.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2021-11-11 15:03:30 +0800
committerGitHub <noreply@github.com>2021-11-11 15:03:30 +0800
commit90eb9fb889e5d3a5845576dbc63e3792f3da33f2 (patch)
tree4107df9dd446fe9a93e49cba1e59d0f721e70351 /services/auth/signin.go
parent492e1c2fbd1b646f4428207942a9f89b56f7b6a9 (diff)
downloadgitea-90eb9fb889e5d3a5845576dbc63e3792f3da33f2.tar.gz
gitea-90eb9fb889e5d3a5845576dbc63e3792f3da33f2.zip
Move EmailAddress & UserRedirect into models/user/ (#17607)
* Move EmailAddress into models/user/ * Fix test * rename user_mail to user_email * Fix test * Move UserRedirect into models/user/ * Fix lint & test * Fix lint * Fix lint * remove nolint comment * Fix lint
Diffstat (limited to 'services/auth/signin.go')
-rw-r--r--services/auth/signin.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/services/auth/signin.go b/services/auth/signin.go
index a7ad029456..5477e8643e 100644
--- a/services/auth/signin.go
+++ b/services/auth/signin.go
@@ -10,6 +10,7 @@ import (
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/models/db"
"code.gitea.io/gitea/models/login"
+ user_model "code.gitea.io/gitea/models/user"
"code.gitea.io/gitea/modules/log"
// Register the sources
@@ -32,7 +33,7 @@ func UserSignIn(username, password string) (*models.User, *login.Source, error)
return nil, nil, err
}
if cnt > 1 {
- return nil, nil, models.ErrEmailAlreadyUsed{
+ return nil, nil, user_model.ErrEmailAlreadyUsed{
Email: user.Email,
}
}