From 1829ff0754c7af0c53a1653ce23b62eb18da1b3f Mon Sep 17 00:00:00 2001 From: wh_zcy Date: Tue, 13 Sep 2022 18:43:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=88=A4=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/user/api_login.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/modules/user/api_login.go b/modules/user/api_login.go index 4687f96ef..8476410ea 100644 --- a/modules/user/api_login.go +++ b/modules/user/api_login.go @@ -68,10 +68,13 @@ func (this *apiComp) Login(session comm.IUserSession, req *pb.UserLoginReq) (cod } isNewUser = true } else { - if cu := this.module.modelSession.getUserSession(user.Uid); cu.SessionId != "" { - code = pb.ErrorCode_UserLogined - return + if cu := this.module.modelSession.getUserSession(user.Uid); cu != nil { + if cu.SessionId != "" { + code = pb.ErrorCode_UserLogined + return + } } + } //bind user