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

pull/18928/head^2
Lunny Xiao 3 years ago committed by GitHub
parent 4697735c8d
commit 59959ab222
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      services/auth/signin.go

@ -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}

Loading…
Cancel
Save