forked from gitea/gitea
1
0
Fork 0

Fix login with email panic when email is not exist (#18942)

Co-authored-by: 6543 <6543@obermui.de>
This commit is contained in:
Lunny Xiao 2022-03-01 02:14:50 +08:00 committed by GitHub
parent 5f9c18b2b3
commit cb90eda213
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -32,7 +32,7 @@ func UserSignIn(username, password string) (*user_model.User, *auth.Source, erro
} }
if !has { if !has {
return nil, nil, user_model.ErrEmailAddressNotExist{ return nil, nil, user_model.ErrEmailAddressNotExist{
Email: user.Email, Email: username,
} }
} }
user = &user_model.User{ID: emailAddress.UID} user = &user_model.User{ID: emailAddress.UID}