当前位置: 首页>>代码示例>>PHP>>正文


PHP SearchHelper::getUserGroupPermissions方法代码示例

本文整理汇总了PHP中SearchHelper::getUserGroupPermissions方法的典型用法代码示例。如果您正苦于以下问题:PHP SearchHelper::getUserGroupPermissions方法的具体用法?PHP SearchHelper::getUserGroupPermissions怎么用?PHP SearchHelper::getUserGroupPermissions使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SearchHelper的用法示例。


在下文中一共展示了SearchHelper::getUserGroupPermissions方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: onSearchGetUserGroupPermissions

 function onSearchGetUserGroupPermissions($userGroupIds)
 {
     if (!$userGroupIds) {
         return array();
     }
     $result = SearchHelper::getUserGroupPermissions($userGroupIds);
     return $result;
 }
开发者ID:Kingson4Wu,项目名称:php_demo,代码行数:8,代码来源:my.php

示例2: foreach

foreach ($_extgroupids as $v) {
    if ($v) {
        $my_extgroupids[] = $v;
    }
}
$my_extgroupids_str = implode(',', $my_extgroupids);
$params = array('sId' => $_G['setting']['my_siteid'], 'ts' => time(), 'cuId' => $_G['uid'], 'cuName' => $_G['username'], 'gId' => $_G['groupid'], 'agId' => $_G['adminid'], 'egIds' => $my_extgroupids_str, 'fmSign' => substr($my_forums['sign'], -4));
$groupIds = explode(',', $_G['groupid']);
if ($_G['adminid']) {
    $groupIds[] = $_G['adminid'];
}
if ($my_extgroupids) {
    $groupIds = array_merge($groupIds, $my_extgroupids);
}
$groupIds = array_unique($groupIds);
$userGroups = SearchHelper::getUserGroupPermissions($groupIds);
foreach ($groupIds as $k => $v) {
    $value = substr($userGroups[$v]['sign'], -4);
    if ($value) {
        $params['ugSign' . $v] = $value;
    }
}
$params['sign'] = md5(implode('|', $params) . '|' . $_G['setting']['my_sitekey']);
$extra = array('q', 'fId', 'author', 'scope', 'source', 'module', 'isAdv');
foreach ($extra as $v) {
    if ($_GET[$v]) {
        $params[$v] = $_GET[$v];
    }
}
$params['charset'] = $_G['charset'];
if ($_G['setting']['my_search_domain']) {
开发者ID:v998,项目名称:discuzx-en,代码行数:31,代码来源:search_my.php

示例3: getGuestPerm

 function getGuestPerm($gfIds = array())
 {
     $perm = SearchHelper::getUserGroupPermissions(array(7));
     $guestPerm = $perm[7];
     if ($gfIds) {
         $sql = 'SELECT fid, gviewperm FROM ' . DB::table('forum_forumfield') . ' WHERE fid IN (' . implode(',', $gfIds) . ')';
         $query = DB::query($sql);
         while ($row = DB::fetch($query)) {
             if ($row['gviewperm'] == 1) {
                 $guestPerm['allowForumIds'][] = $row['fid'];
             } else {
                 $guestPerm['forbidForumIds'][] = $row['fid'];
             }
         }
     }
     return $guestPerm;
 }
开发者ID:pan289091315,项目名称:Discuz,代码行数:17,代码来源:Manyou.php

示例4: search_get_usergroups

function search_get_usergroups($groupIds)
{
    global $_G;
    require_once DISCUZ_ROOT . './api/manyou/Manyou.php';
    $missGroupIds = array();
    $res = array();
    foreach ($groupIds as $groupId) {
        $kname = 'search_group_hash_' . $groupId;
        loadcache($kname);
        if (TIMESTAMP - $_G['cache'][$kname]['ts'] > 21600) {
            $missGroupIds[] = $groupId;
        } else {
            $res[$groupId]['sign'] = $_G['cache'][$kname]['sign'];
        }
    }
    if ($missGroupIds) {
        $userGroups = SearchHelper::getUserGroupPermissions($missGroupIds);
        foreach ($userGroups as $groupId => $userGroup) {
            $kname = $kname = 'search_group_hash_' . $groupId;
            $data = array('ts' => TIMESTAMP, 'sign' => $userGroup['sign']);
            save_syscache($kname, $data);
            $res[$groupId]['sign'] = $userGroup['sign'];
        }
    }
    return $res;
}
开发者ID:pan289091315,项目名称:Discuz,代码行数:26,代码来源:function_search.php


注:本文中的SearchHelper::getUserGroupPermissions方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。