修正2个bug。 1:未验证显示密码错误 2:未验证无法重发email

This commit is contained in:
日下部 詩 2021-02-18 03:33:29 +08:00 committed by GitHub
parent 6c67b704e7
commit 6f6e184955
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -140,7 +140,7 @@ func GetActiveUserByOpenID(openid string) (User, error) {
// GetUserByEmail 用Email获取用户
func GetUserByEmail(email string) (User, error) {
var user User
result := DB.Set("gorm:auto_preload", true).Where("status = ? and email = ?", Active, email).First(&user)
result := DB.Set("gorm:auto_preload", true).Where("email = ?", email).First(&user)
return user, result.Error
}