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


PHP permissions::getUserGroups方法代码示例

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


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

示例1: foreach

?>
"> 
<input type="submit" value=" Показать ">
</form>

<br><br>

<table width="100%" border="0" cellspacing="5" cellpadding="5">
<?php 
if ($users) {
    ?>
    <?php 
    foreach ($users as $user) {
        ?>
        <?php 
        $user_groups = permissions::getUserGroups($user['uid']);
        $user_rights = permissions::getUserExtraRights($user['uid']);
        $utype = is_emp($user['role']) ? 'emp' : 'frl';
        ?>
        <tr>
            <td>
                <table width="100%" cellspacing="0" cellpadding="0" border="0">
            		<tr valign="top" class="n_qpr">
            			<td width="70" align="center"><a name="user_<?php 
        echo $user['uid'];
        ?>
"></a><a href="/users/<?php 
        echo $user['login'];
        ?>
" class="<?php 
        echo $utype;
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:31,代码来源:inner_user_list.php

示例2: header

     permissions::deleteUser($user_id);
     header('Location: ?action=user_list');
     exit;
     break;
 case 'user_edit':
     $user_id = __paramInit('int', 'uid', 'uid');
     require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/users.php';
     $user = new users();
     $user->GetUserByUID($user_id);
     $groups = permissions::getAllGroups();
     foreach ($groups as $k => $group) {
         $g_rights = permissions::getGroupInfo($group['id']);
         $groups[$k]['rights'] = $g_rights['rights'];
     }
     $rights = permissions::getAllRights();
     $user_groups_data = permissions::getUserGroups($user_id);
     $user_groups = array();
     $user_groups_rights = array();
     foreach ($user_groups_data as $user_group) {
         array_push($user_groups, $user_group['id']);
         $g_rights = permissions::getGroupInfo($user_group['id']);
         if ($g_rights['rights']) {
             foreach ($g_rights['rights'] as $g_right) {
                 if (!in_array($g_right, $user_groups_rights)) {
                     array_push($user_groups_rights, $g_right);
                 }
             }
         }
     }
     $user_rights_data = permissions::getUserExtraRights($user_id);
     $user_rights_allow = array();
开发者ID:kapai69,项目名称:fl-ru-damp,代码行数:31,代码来源:index.php


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