From 6f6e1849554efba465c6ba56e2d0f9dade166d72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=97=A5=E4=B8=8B=E9=83=A8=20=E8=A9=A9?= Date: Thu, 18 Feb 2021 03:33:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A32=E4=B8=AAbug=E3=80=82=201:?= =?UTF-8?q?=E6=9C=AA=E9=AA=8C=E8=AF=81=E6=98=BE=E7=A4=BA=E5=AF=86=E7=A0=81?= =?UTF-8?q?=E9=94=99=E8=AF=AF=202:=E6=9C=AA=E9=AA=8C=E8=AF=81=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E9=87=8D=E5=8F=91email?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- models/user.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/user.go b/models/user.go index c4226f0..9774d03 100644 --- a/models/user.go +++ b/models/user.go @@ -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 }