예제 #1
0
def getUserBaseInfo(userId):
    datas = tyrpcsdk.getUserDatas(userId, _UserBaseAttrs)
    name = datas.get(UserKeys.ATT_NAME, 'error name')
    purl = datas.get(UserKeys.ATT_PURL, '')
    sex = datas.get(UserKeys.ATT_SEX, 0)
    address = datas.get(UserKeys.ATT_ADDRESS, '')
    citycode = datas.get(UserKeys.ATT_CITY_CODE, '')
    return name, purl, sex, address, citycode
예제 #2
0
def _search_user_by_id(userId):
    user_info = tyrpcsdk.getUserDatas(userId, _UserBaseAttrs)
    debug("tyrpcsdk.getUserDatas ", userId, user_info)
    name = user_info.get('name', "")
    if name:
        user_info["userId"] = userId
        user_info["authorTime"] = format_author_time(user_info.get('authorTime', ""))
        user_info["lastAuthorTime"] = format_author_time(user_info.get('lastAuthorTime', ""))
        return user_info
    else:
        return None
예제 #3
0
def getUserBaseInfo(userId):
    datas = tyrpcsdk.getUserDatas(userId, _UserBaseAttrs)
    name = datas.get(UserKeys.ATT_NAME, 'error name')
    purl = datas.get(UserKeys.ATT_PURL, '')
    sex = datas.get(UserKeys.ATT_SEX, 0)
    return name, purl, sex
예제 #4
0
def getUserSexInfo(userId):
    datas = tyrpcsdk.getUserDatas(userId, _UserBaseAttrs)
    sex = datas.get(UserKeys.ATT_SEX, 0)
    return sex
예제 #5
0
def _search_user_by_phone(phone):
    tyrpcsdk.getUserDatas(phone, ["userId", "nickName"])
    return None