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

This commit is contained in:
Lunny Xiao
2022-03-01 01:33:33 +08:00
committed by GitHub
parent 4697735c8d
commit 59959ab222

View File

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