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


PHP Group_User::getTable方法代码示例

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


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

示例1: notMultiple

 static function notMultiple($item)
 {
     if ($_SESSION['glpiactiveprofile']['interface'] == 'central') {
         $peConfig = new PluginEscalationConfig();
         $unique_assigned = $peConfig->getValue("unique_assigned", $item->fields['entities_id']);
         if ($unique_assigned == '1') {
             $ticket_User = new Ticket_User();
             $group_Ticket = new Group_Ticket();
             $group_User = new Group_User();
             if (isset($item->input['_itil_assign'])) {
                 if ($item->input['_itil_assign']['_type'] == 'user') {
                     $in_group = 0;
                     $a_groups = $group_Ticket->find("`type`='2'\n                     AND `tickets_id`='" . $item->fields['id'] . "'");
                     $groups = Group_User::getUserGroups($item->input['_itil_assign']['users_id']);
                     if (count($a_groups) > 0) {
                         foreach ($a_groups as $data) {
                             foreach ($groups as $dat) {
                                 if ($dat['id'] == $data['groups_id']) {
                                     $in_group = 1;
                                 }
                             }
                         }
                     }
                     //if ($in_group == '0') {
                     //   unset($item->input['_itil_assign']['users_id']);
                     //}
                 } else {
                     if ($item->input['_itil_assign']['_type'] == 'group') {
                         $a_groups = $group_Ticket->find("`type`='2'\n                     AND `tickets_id`='" . $item->getID() . "'");
                         if (count($a_groups) > 0) {
                             foreach ($a_groups as $data) {
                                 $group_Ticket->delete($data);
                             }
                         }
                         $a_users = $ticket_User->find("`type`='2'\n                     AND `tickets_id`='" . $item->getID() . "'");
                         foreach ($a_users as $data) {
                             if (countElementsInTable($group_User->getTable(), "`users_id`='" . $data['users_id'] . "'\n                             AND `groups_id`='" . $item->input['_itil_assign']['groups_id'] . "'") == '0') {
                                 $ticket_User->delete($data);
                             }
                         }
                     }
                 }
             }
         }
     }
 }
开发者ID:geldarr,项目名称:hack-space,代码行数:46,代码来源:group_group.class.php


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