zhangjingyu
果然在lib/gather/gathercache/pw_membersdbcache.cache.php文件中找到了:
“ /**
* 从dbcache获取用户信息, 积分信息,群组信息 (该函数仅供read.php页面调用)
*
* @param array $userIds
* @param boolean $showCredit 是否要获取积分信息
* @param boolean $showColony 是否要获取群组信息
* @param boolean $withMemberInfo 是否获取MemberInfo信息
* @return array()
*/
function getUserDBCacheByUserIds($userIds, $showCredit = false, $showColony = false, $showfield = false) {
if (!S::isArray($userIds)) return array(array(), array(), array());
$membersKeys = $colonyKeys = $creditKeys = $members = $colony = $credit = array ();
foreach ( $userIds as $userId ) {
$membersKeys [$this->_getMembersKey($userId)] = $userId;
$showCredit && $creditKeys [$this->_getCreditKey($userId)] = $userId;
$showColony && $colonyKeys [$this->_getColonyKey($userId)] = $userId;
}
$tmpResult = $this->get(array_keys($membersKeys + $colonyKeys + $creditKeys));
if ($tmpResult){
foreach ( $tmpResult as $key => $value ) {
if (!is_array($value)) continue;
if (isset($membersKeys[$key])){
$members[$membersKeys[$key]] = $value;
unset($membersKeys[$key]);
}else if (isset($creditKeys[$key])){
$credit[$creditKeys[$key]] = $value;
unset($creditKeys[$key]);
}else if (isset($colonyKeys[$key])){
$colony[$colonyKeys[$key]] = $value;
unset($colonyKeys[$key]);
}
}
}
if ($membersKeys) { #会员信息
$members += (array)$this->_getMembersByUserIdsNoCache($membersKeys, $showfield);