From c92996a1d9c04069a5f3370a0369361dd709b23a Mon Sep 17 00:00:00 2001 From: gazebo Date: Mon, 6 Jan 2020 16:54:54 +0800 Subject: [PATCH 1/2] up --- business/jxstore/cms/user2.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/business/jxstore/cms/user2.go b/business/jxstore/cms/user2.go index 984258def..e272e2a48 100644 --- a/business/jxstore/cms/user2.go +++ b/business/jxstore/cms/user2.go @@ -153,11 +153,11 @@ func RegisterUserWithMobile(ctx *jxcontext.Context, user *model.User, mobileVeri createName := ctx.GetRealRemoteIP() authType := auth2.AuthTypeMobile if manTokenInfo != nil && mobileVerifyCode == "" { - user, err2 := dao.GetUserByID(dao.GetDB(), "user_id", manTokenInfo.GetID()) + manUser, err2 := dao.GetUserByID(dao.GetDB(), "user_id", manTokenInfo.GetID()) if err = err2; err != nil { return nil, err } - if user.Type&(model.UserTypeOperator|model.UserTypeBoss) == 0 { + if manUser.Type&(model.UserTypeOperator|model.UserTypeBoss) == 0 { return nil, fmt.Errorf("管理员才能添加商户") } if utils.Pointer2String(user.Mobile) == "" { From c331ae3996e9df5a3a589939701df304ce3ce52f Mon Sep 17 00:00:00 2001 From: gazebo Date: Mon, 6 Jan 2020 17:30:36 +0800 Subject: [PATCH 2/2] fk --- business/auth2/auth2.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/business/auth2/auth2.go b/business/auth2/auth2.go index 6b7ce94da..da46bbc13 100644 --- a/business/auth2/auth2.go +++ b/business/auth2/auth2.go @@ -285,7 +285,7 @@ func Login(ctx *Context, authType, authID, authIDType, authSecret string) (authI if authSecret == InternalAuthSecret { authSecret = "" } - return LoginInternal(ctx, authIDType, authID, authIDType, authSecret) + return LoginInternal(ctx, authType, authID, authIDType, authSecret) } // 通过临时TOKEN绑定新创建的用户