首页| 版块| 我的| 发帖| 消息
主题:关于在帖子阅读页头像弹出层显示今日发帖数的研究
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);
zhangjingyu回帖于2022-01-14 22:41[查看电脑版]
下一页 (1/3)
下一楼»:“/**
* 获取会员信息
*
* @param array $userIds
* @param boolean $ ..
«上一楼:找不到查询,只能继续看read.php文件中的代码。当看到1楼那部分代码时,也就是第一处黄色背景色 ..

查看全部回帖(17)
«返回主帖