From dc7b590977ad1b79a0cbcd4474141e2d283e8e8b Mon Sep 17 00:00:00 2001 From: eson <9673575+githubcontent@user.noreply.gitee.com> Date: Wed, 6 Sep 2023 16:21:21 +0800 Subject: [PATCH 1/3] fix --- model/gmodel/fs_user_logic.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/gmodel/fs_user_logic.go b/model/gmodel/fs_user_logic.go index 09ee122d..63f4d04e 100644 --- a/model/gmodel/fs_user_logic.go +++ b/model/gmodel/fs_user_logic.go @@ -128,7 +128,7 @@ func (u *FsUserModel) RegisterByGoogleOAuth(ctx context.Context, token *auth.Reg // 如果已经存在,把谷歌id 加入到用户信息里 user.GoogleId = &googleId - return tx.Model(&FsUser{}).Where("id = ?", user.Id).Update("google_id", user).Error + return tx.Model(&FsUser{}).Where("id = ?", user.Id).Update("google_id", googleId).Error }) if err != nil { From b23e907871cd5c51cf63eb3cf6192268eb5c50ef Mon Sep 17 00:00:00 2001 From: eson <9673575+githubcontent@user.noreply.gitee.com> Date: Wed, 6 Sep 2023 16:33:24 +0800 Subject: [PATCH 2/3] fix --- model/gmodel/fs_user_logic.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/gmodel/fs_user_logic.go b/model/gmodel/fs_user_logic.go index 63f4d04e..89b3cc5e 100644 --- a/model/gmodel/fs_user_logic.go +++ b/model/gmodel/fs_user_logic.go @@ -92,7 +92,7 @@ func InheritGuestIdResource(tx *gorm.DB, userId, guestId int64, afterDo func(txR } return afterDo(txRes, txUserMaterial, txUserInfo) } - return fmt.Errorf("guest_id must not be 0") + return nil } // 谷歌平台的注册流程 From 866d9179a9ef9e3ddc8b350ec3743c2dcc04f379 Mon Sep 17 00:00:00 2001 From: eson <9673575+githubcontent@user.noreply.gitee.com> Date: Wed, 6 Sep 2023 16:35:44 +0800 Subject: [PATCH 3/3] fix --- fs_template/email_register_oauth2.tpl | 2 +- server/auth/internal/logic/useremailregisterlogic.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/fs_template/email_register_oauth2.tpl b/fs_template/email_register_oauth2.tpl index 85ed4fab..6d8b4c89 100644 --- a/fs_template/email_register_oauth2.tpl +++ b/fs_template/email_register_oauth2.tpl @@ -11,7 +11,7 @@ From: "Fusen Support"

Thank you for choosing {{ .CompanyName }}. To complete the account setup process, please click the button below to confirm your email address:

-Confirm Email: {{ .UserName }} +Confirm Email: {{ .Email }}

Confirming your email ensures your account is properly secured. This also allows you to access member-only tools and content.

diff --git a/server/auth/internal/logic/useremailregisterlogic.go b/server/auth/internal/logic/useremailregisterlogic.go index 8c7c1c38..fb3d8abe 100644 --- a/server/auth/internal/logic/useremailregisterlogic.go +++ b/server/auth/internal/logic/useremailregisterlogic.go @@ -91,6 +91,7 @@ func (l *UserEmailRegisterLogic) UserEmailRegister(req *types.RequestEmailRegist SenderTitle: "register-valid", Extend: map[string]string{ "UserName": userName, + "Email": req.Email, }, } // email进入队