添加判空
This commit is contained in:
parent
fd58f469b6
commit
1829ff0754
@ -68,12 +68,15 @@ func (this *apiComp) Login(session comm.IUserSession, req *pb.UserLoginReq) (cod
|
|||||||
}
|
}
|
||||||
isNewUser = true
|
isNewUser = true
|
||||||
} else {
|
} else {
|
||||||
if cu := this.module.modelSession.getUserSession(user.Uid); cu.SessionId != "" {
|
if cu := this.module.modelSession.getUserSession(user.Uid); cu != nil {
|
||||||
|
if cu.SessionId != "" {
|
||||||
code = pb.ErrorCode_UserLogined
|
code = pb.ErrorCode_UserLogined
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
//bind user
|
//bind user
|
||||||
err = session.Bind(user.Uid, this.service.GetId())
|
err = session.Bind(user.Uid, this.service.GetId())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user