zhangjingyu
“/**
* 获取会员信息
*
* @param array $userIds
* @param boolean $showfield 是否获取MemberInfo信息
* @return array()
*/
function _getMembersByUserIdsNoCache($userIds, $showfield = false) {
if (!S::isArray($userIds)) return array();
global $customfield;
$fieldinfo = '';
if (is_array($customfield)) {
foreach ($customfield as $value) {
if ($value['ifsys']) continue;
$fieldinfo .= ',mi.field_'.(int)$value['id'];
}
}
!empty($showfield) && $fieldinfo .= ',mi.customdata';
$tableinfo = $fieldinfo ? 'LEFT JOIN pw_memberinfo mi ON mi.uid=m.uid' : '';
$query = $this->_db->query ( "SELECT bg.membg,bg.conbg,m.uid,m.username,m.gender,m.oicq,m.aliww,m.groupid,m.memberid,m.icon AS micon ,m.hack,m.honor,m.signature,m.regdate,m.medals,m.userstatus,md.postnum,md.digests,md.rvrc,md.money,md.credit,md.currency,md.thisvisit,md.lastvisit,md.onlinetime,md.starttime,md.punch,md.todaypost,md.monthpost,md.lastpost,md.monoltime $fieldinfo FROM pw_members m LEFT JOIN pw_memberdata md ON m.uid=md.uid LEFT JOIN pw_show_users bg ON bg.uid=m.uid $tableinfo WHERE m.uid IN (" . S::sqlImplode ( $userIds, false ) . ") " );
$members = $tmpMembers = array();
while ( $rt = $this->_db->fetch_array ( $query ) ) {
$members [$rt ['uid']] = $rt;
$tmpMembers [$this->_getMembersKey($rt ['uid'])] = $rt;
}
foreach ($userIds as $userId){
!isset($members[$userId]) && $tmpMembers[$this->_getMembersKey($userId)] = array();
}
$this->update ($tmpMembers);
return $members;
}”(引用内容)看注释“获取会员信息”,还有里面的查询,没错,就是这里了! 红色部分就是这次添加的查询。