RegisterUser支持注册用户时,不指定手机号
This commit is contained in:
@@ -145,3 +145,14 @@ func (ctx *Context) GetMobileAndUserID() (mobile, userID string) {
|
||||
}
|
||||
return mobile, userID
|
||||
}
|
||||
|
||||
func (ctx *Context) GetUserID() (userID string) {
|
||||
token := ctx.GetToken()
|
||||
authInfo, err2 := auth2.GetTokenInfo(token)
|
||||
if err2 == nil {
|
||||
if authInfo.TokenType == auth2.TokenTypeNormal {
|
||||
userID = authInfo.GetID()
|
||||
}
|
||||
}
|
||||
return userID
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user