添加判空
This commit is contained in:
parent
fd58f469b6
commit
1829ff0754
@ -68,10 +68,13 @@ 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 {
|
||||||
code = pb.ErrorCode_UserLogined
|
if cu.SessionId != "" {
|
||||||
return
|
code = pb.ErrorCode_UserLogined
|
||||||
|
return
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//bind user
|
//bind user
|
||||||
|
Loading…
Reference in New Issue
Block a user