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
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
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
def getUserSexInfo(userId): datas = tyrpcsdk.getUserDatas(userId, _UserBaseAttrs) sex = datas.get(UserKeys.ATT_SEX, 0) return sex
def _search_user_by_phone(phone): tyrpcsdk.getUserDatas(phone, ["userId", "nickName"]) return None