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


PHP Groups::getUsersOfGroup方法代码示例

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


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

示例1: adhocAssignUsersk

 function adhocAssignUsersk($params)
 {
     G::LoadClass('groups');
     G::LoadClass('tasks');
     $oTasks = new Tasks();
     $aAux = $oTasks->getGroupsOfTask($_SESSION['TASK'], 2);
     $aAdhocUsers = array();
     $oGroups = new Groups();
     foreach ($aAux as $aGroup) {
         $aUsers = $oGroups->getUsersOfGroup($aGroup['GRP_UID']);
         foreach ($aUsers as $aUser) {
             if ($aUser['USR_UID'] != $_SESSION['USER_LOGGED']) {
                 $aAdhocUsers[] = $aUser['USR_UID'];
             }
         }
     }
     $aAux = $oTasks->getUsersOfTask($_SESSION['TASK'], 2);
     foreach ($aAux as $aUser) {
         if ($aUser['USR_UID'] != $_SESSION['USER_LOGGED']) {
             $aAdhocUsers[] = $aUser['USR_UID'];
         }
     }
     require_once 'classes/model/Users.php';
     $oCriteria = new Criteria('workflow');
     $oCriteria->addSelectColumn(UsersPeer::USR_UID);
     $oCriteria->addSelectColumn(UsersPeer::USR_FIRSTNAME);
     $oCriteria->addSelectColumn(UsersPeer::USR_LASTNAME);
     $oCriteria->add(UsersPeer::USR_UID, $aAdhocUsers, Criteria::IN);
     $oDataset = UsersPeer::doSelectRS($oCriteria);
     $oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
     $aData = array();
     while ($oDataset->next()) {
         $aData[] = $oDataset->getRow();
     }
     $this->data = $aData;
 }
开发者ID:nshong,项目名称:processmaker,代码行数:36,代码来源:adhocUserProxy.php

示例2: explode

 $APP_UIDS = explode(',', $_POST['APP_UIDS']);
 $sReassignFromUser = $_POST['FROM_USR_ID'];
 G::LoadClass('tasks');
 G::LoadClass('groups');
 G::LoadClass('case');
 $oTasks = new Tasks();
 $oGroups = new Groups();
 $oUser = new Users();
 $oCases = new Cases();
 $aCasesList = array();
 foreach ($APP_UIDS as $APP_UID) {
     $aCase = $oCases->loadCaseInCurrentDelegation($APP_UID, true);
     $aUsersInvolved = array();
     $aCaseGroups = $oTasks->getGroupsOfTask($aCase['TAS_UID'], 1);
     foreach ($aCaseGroups as $aCaseGroup) {
         $aCaseUsers = $oGroups->getUsersOfGroup($aCaseGroup['GRP_UID']);
         foreach ($aCaseUsers as $aCaseUser) {
             if ($aCaseUser['USR_UID'] != $sReassignFromUser) {
                 $aCaseUserRecord = $oUser->load($aCaseUser['USR_UID']);
                 $aUsersInvolved[$aCaseUser['USR_UID']] = $aCaseUserRecord['USR_FIRSTNAME'] . ' ' . $aCaseUserRecord['USR_LASTNAME'];
                 // . ' (' . $aCaseUserRecord['USR_USERNAME'] . ')';
             }
         }
     }
     $aCaseUsers = $oTasks->getUsersOfTask($aCase['TAS_UID'], 1);
     foreach ($aCaseUsers as $aCaseUser) {
         if ($aCaseUser['USR_UID'] != $sReassignFromUser) {
             $aCaseUserRecord = $oUser->load($aCaseUser['USR_UID']);
             $aUsersInvolved[$aCaseUser['USR_UID']] = $aCaseUserRecord['USR_FIRSTNAME'] . ' ' . $aCaseUserRecord['USR_LASTNAME'];
             // . ' (' . $aCaseUserRecord['USR_USERNAME'] . ')';
         }
开发者ID:bqevin,项目名称:processmaker,代码行数:31,代码来源:cases_Ajax.php

示例3: getGrpUser

    function getGrpUser ($aData)

    {

        G::LoadClass( 'groups' );

        G::LoadClass( 'tasks' );

        require_once 'classes/model/Content.php';

        $oTasks = new Tasks();

        $oGroups = new Groups();

        $oContent = new Content();

        $aGroup = array ();

        $aUsers = array ();

        $aGroup = $oTasks->getGroupsOfTask( $aData['ROU_NEXT_TASK'], 1 );

        $aGrpUid = $aGroup[0]['GRP_UID'];

        $sGrpName = $oContent->load( 'GRP_TITLE', '', $aGrpUid, 'en' );

        $aGrp['GRP_NAME'] = $sGrpName;

        $aGrp['GRP_UID'] = $aGrpUid;

        $aUsers = $oGroups->getUsersOfGroup( $aGroup[0]['GRP_UID'] );

        foreach ($aUsers as $aKey => $userid) {

            $aData[$aKey] = $userid;

        }

        return $aGrp;

    }
开发者ID:rrsc,项目名称:processmaker,代码行数:41,代码来源:class.derivation.php

示例4: getUsersToReassign

    public function getUsersToReassign($TAS_UID, $USR_UID, $PRO_UID=null)

    {

        G::LoadClass('groups');

        G::LoadClass('tasks');



        $oTasks = new Tasks();

        $aAux = $oTasks->getGroupsOfTask($TAS_UID, 1);

        $row = array();

        $groups = new Groups();

        foreach ($aAux as $aGroup) {

            $aUsers = $groups->getUsersOfGroup($aGroup['GRP_UID']);

            foreach ($aUsers as $aUser) {

                if ($aUser['USR_UID'] != $USR_UID) {

                    $row[] = $aUser['USR_UID'];

                }

            }

        }



        $aAux = $oTasks->getUsersOfTask($TAS_UID, 1);

        foreach ($aAux as $aUser) {

            if ($aUser['USR_UID'] != $USR_UID) {

                $row[] = $aUser['USR_UID'];

            }

        }



        // Group Ad Hoc

        $oTasks = new Tasks();

        $aAux = $oTasks->getGroupsOfTask($TAS_UID, 2);

        $groups = new Groups();

        foreach ($aAux as $aGroup) {

            $aUsers = $groups->getUsersOfGroup($aGroup['GRP_UID']);

            foreach ($aUsers as $aUser) {

                if ($aUser['USR_UID'] != $USR_UID) {

                    $row[] = $aUser['USR_UID'];

                }

            }

        }



        // User Ad Hoc

        $aAux = $oTasks->getUsersOfTask($TAS_UID, 2);

        foreach ($aAux as $aUser) {

            if ($aUser['USR_UID'] != $USR_UID) {

                $row[] = $aUser['USR_UID'];

            }

        }



        global $RBAC;

        //Adding the actual user if this has the PM_SUPERVISOR permission assigned.

        if ($RBAC->userCanAccess('PM_SUPERVISOR') == 1) {

            if(!in_array($RBAC->aUserInfo['USER_INFO']['USR_UID'], $row)) {

//.........这里部分代码省略.........
开发者ID:nhenderson,项目名称:processmaker,代码行数:101,代码来源:class.case.php

示例5: routeCaseNotification

    /**
     * Send Message each user id
     *
     * @param array $request_data
     * @author Ronald Quenta <ronald.quenta@processmaker.com>
     *
     */
    public function routeCaseNotification($currentUserId, $processId, $currentTaskId, $appFields, $aTasks, $nextIndex)
    {
        try {
            $oUser = new \Users();
            $aUser = $oUser->load( $currentUserId );

            $response = array();
            $task = new \Tasks();
            $group = new \Groups();
            foreach ($aTasks as $aTask) {
                $arrayTaskUser = array();
                switch ($aTask["TAS_ASSIGN_TYPE"]) {
                    case "SELF_SERVICE":
                        if (isset($aTask["TAS_UID"]) && !empty($aTask["TAS_UID"])) {
                            $arrayAux1 = $task->getGroupsOfTask($aTask["TAS_UID"], 1);
                            foreach ($arrayAux1 as $arrayGroup) {
                                $arrayAux2 = $group->getUsersOfGroup($arrayGroup["GRP_UID"]);
                                foreach ($arrayAux2 as $arrayUser) {
                                    $arrayTaskUser[] = $arrayUser["USR_UID"];
                                }
                            }
                            $arrayAux1 = $task->getUsersOfTask($aTask["TAS_UID"], 1);

                            foreach ($arrayAux1 as $arrayUser) {
                                $arrayTaskUser[] = $arrayUser["USR_UID"];
                            }
                        }
                        break;
                    default:
                        if (isset($aTask["USR_UID"]) && !empty($aTask["USR_UID"])) {
                            $arrayTaskUser = $aTask["USR_UID"];
                        }
                        break;
                }

//                $oTask = new \Task();
//                $currentTask = $oTask->load($aTask['TAS_UID']);
                $delIndex = null;
                foreach ($nextIndex as $nIndex) {
                    if($aTask['TAS_UID'] == $nIndex['TAS_UID']){
                        $delIndex = $nIndex['DEL_INDEX'];
                        break;
                    }
                }

                $userIds = $arrayTaskUser;
                $message = '#'. $appFields['APP_NUMBER'] . ' : '.$appFields['APP_TITLE'];
                $data = array(
                    'processId' => $processId,
                    'taskId' => $aTask["TAS_UID"],
                    'caseId' => $appFields['APP_UID'],
                    'caseTitle' => $appFields['APP_TITLE'],
                    'delIndex' => $delIndex,
                    'typeList' => 'todo'
                );

                if ($userIds) {

                    $oNoti = new \NotificationDevice();
                    $devices = array();
                    if (is_array($userIds)){
                        foreach ($userIds as $id) {
                            $deviceUser = $oNoti->loadByUsersId($id);
                            $devices = array_merge($devices, $deviceUser);
                        }
                    } else {
                        $devices = $oNoti->loadByUsersId($userIds);
                        $lists   = new \ProcessMaker\BusinessModel\Lists();
                        $counter = $lists->getCounters($userIds);
                        $light   = new \ProcessMaker\Services\Api\Light();
                        $result  = $light->parserCountersCases($counter);
                        $data['counters'] = $result;
                    }

                    $devicesAndroidIds = array();
                    $devicesAppleIds = array();
                    foreach ($devices as $dev) {
                        switch ($dev['DEV_TYPE']) {
                            case "apple":
                                $devicesAppleIds[] = $dev['DEV_REG_ID'];
                                break;
                            case "android":
                                $devicesAndroidIds[] = $dev['DEV_REG_ID'];
                                break;
                        }
                    }
                    if (count($devicesAppleIds) > 0) {
                        $oNotification = new PushMessageIOS();
                        $oNotification->setSettingNotification();
                        $oNotification->setDevices($devicesAppleIds);
                        $response['apple'] = $oNotification->send($message, $data);
                    }
                    if (count($devicesAndroidIds) > 0) {
//.........这里部分代码省略.........
开发者ID:nhenderson,项目名称:processmaker,代码行数:101,代码来源:NotificationDevice.php

示例6: getExtusersadhoc

 public function getExtusersadhoc($start, $limit, $sProcessUID = '', $sTaskUID = '')
 {
     try {
         $oProcess = new Process();
         $aFields = $oProcess->load($sProcessUID);
         $oTask = new Task();
         $aFields = $oTask->load($sTaskUID);
         $_SESSION['iType'] = 2;
         $aFields['TASK'] = $sTaskUID;
         $aFields['TYPE'] = $_SESSION['iType'];
         $aFields['OF_TO_ASSIGN'] = G::LoadTranslation('ID_DE_ASSIGN');
         $aFields['CONFIRM'] = G::LoadTranslation('ID_MSG_CONFIRM_DEASIGN_USER_GROUP_MESSAGE');
         $aFields['UIDS'] = "'0'";
         $oTasks = new Tasks();
         $oGroups = new Groups();
         $aAux1 = $oTasks->getGroupsOfTask($sTaskUID, $_SESSION['iType']);
         foreach ($aAux1 as $aGroup) {
             $aAux2 = $oGroups->getUsersOfGroup($aGroup['GRP_UID']);
             foreach ($aAux2 as $aUser) {
                 $aFields['UIDS'] .= ",'" . $aUser['USR_UID'] . "'";
             }
         }
         global $G_PUBLISH;
         $G_PUBLISH = new Publisher();
         $oTask = new Task();
         $aTask = $oTask->load($sTaskUID);
         //$assignedUsers = getExtTaskUsersCriteria($sTaskUID, $_SESSION ['iType']);
         $this->getExtTaskUsersAdHocCriteria($start, $limit, $sTaskUID, $_SESSION['iType']);
         return $_SESSION['_DBArray']['taskUsers'];
     } catch (Exception $oError) {
         throw $oError;
     }
 }
开发者ID:rodrigoivan,项目名称:processmaker,代码行数:33,代码来源:class.processMap.php

示例7: getUsersToReassign

 public function getUsersToReassign($TAS_UID, $USR_UID)
 {
     G::LoadClass('groups');
     G::LoadClass('tasks');
     $oTasks = new Tasks();
     $aAux = $oTasks->getGroupsOfTask($TAS_UID, 1);
     $row = array();
     $groups = new Groups();
     foreach ($aAux as $aGroup) {
         $aUsers = $groups->getUsersOfGroup($aGroup['GRP_UID']);
         foreach ($aUsers as $aUser) {
             if ($aUser['USR_UID'] != $USR_UID) {
                 $row[] = $aUser['USR_UID'];
             }
         }
     }
     $aAux = $oTasks->getUsersOfTask($TAS_UID, 1);
     foreach ($aAux as $aUser) {
         if ($aUser['USR_UID'] != $USR_UID) {
             $row[] = $aUser['USR_UID'];
         }
     }
     $aAux = $oTasks->getUsersOfTask($TAS_UID, 2);
     foreach ($aAux as $aUser) {
         if ($aUser['USR_UID'] != $USR_UID) {
             $row[] = $aUser['USR_UID'];
         }
     }
     require_once 'classes/model/Users.php';
     $c = new Criteria('workflow');
     $c->addSelectColumn(UsersPeer::USR_UID);
     $c->addSelectColumn(UsersPeer::USR_USERNAME);
     $c->addSelectColumn(UsersPeer::USR_FIRSTNAME);
     $c->addSelectColumn(UsersPeer::USR_LASTNAME);
     $c->add(UsersPeer::USR_UID, $row, Criteria::IN);
     $rs = UsersPeer::doSelectRs($c);
     $rs->setFetchmode(ResultSet::FETCHMODE_ASSOC);
     $rows = array();
     while ($rs->next()) {
         $rows[] = $rs->getRow();
     }
     return $rows;
 }
开发者ID:rodrigoivan,项目名称:processmaker,代码行数:43,代码来源:class.case.php

示例8: uxGroupUpdate

 public function uxGroupUpdate($httpData)
 {
     G::LoadClass('groups');
     $groups = new Groups();
     $users = $groups->getUsersOfGroup($httpData->GRP_UID);
     $success = true;
     $usersAdmin = '';
     foreach ($users as $user) {
         if ($user['USR_ROLE'] == 'PROCESSMAKER_ADMIN' && ($httpData->GRP_UX == 'SIMPLIFIED' || $httpData->GRP_UX == 'SINGLE')) {
             $success = false;
             $usersAdmin .= $user['USR_FIRSTNAME'] . ' ' . $user['USR_LASTNAME'] . ', ';
         }
     }
     if ($success) {
         $group = GroupwfPeer::retrieveByPK($httpData->GRP_UID);
         $group->setGrpUx($httpData->GRP_UX);
         $group->save();
     }
     return array('success' => $success, 'users' => $usersAdmin);
 }
开发者ID:rodrigoivan,项目名称:processmaker,代码行数:20,代码来源:adminProxy.php

示例9: Groups

     echo '<div align="center"><h2><font color="blue">' . G::LoadTranslation('ID_MSG_ASSIGN_DONE') . '</font></h2></div>';
     break;
 case 'usersGroup':
     G::LoadClass('groups');
     $oGroup = new Groups();
     $aGroup = $oGroup->getUsersOfGroup($_POST['GRP_UID']);
     foreach ($aGroup as $iIndex => $aValues) {
         echo $aValues['USR_FIRSTNAME'] . ' ' . $aValues['USR_LASTNAME'] . '<br>';
     }
     break;
     //This case is used to check if any of the user group has as role 'PROCESSMAKER_ADMIN',
 //This case is used to check if any of the user group has as role 'PROCESSMAKER_ADMIN',
 case 'usersAdminGroupExtJS':
     G::LoadClass('groups');
     $oGroup = new Groups();
     $aGroup = $oGroup->getUsersOfGroup($_POST['GRP_UID']);
     $responseUser = 'false';
     $usersAdmin = '';
     foreach ($aGroup as $iIndex => $aValues) {
         if ($aValues['USR_ROLE'] == 'PROCESSMAKER_ADMIN') {
             $responseUser = 'true';
             $usersAdmin .= $aValues['USR_FIRSTNAME'] . ' ' . $aValues['USR_LASTNAME'] . ', ';
         }
     }
     $usersAdmin = substr($usersAdmin, 0, -2);
     $result = new stdClass();
     $result->reponse = $responseUser;
     $result->users = $usersAdmin;
     echo G::json_encode($result);
     break;
 case 'canDeleteUser':
开发者ID:ralpheav,项目名称:processmaker,代码行数:31,代码来源:users_Ajax.php

示例10: while

 }
 G::header('location: users_Delete?USR_UID=' . $USR_UID);
 $oDataset = ApplicationPeer::doSelectRS($oCriteriaToDo);
 $oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
 $oDataset->next();
 while ($aRow = $oDataset->getRow()) {
     $c++;
     $oTemplatePower->newBlock('cases');
     $aKeys = array_keys($aRow);
     foreach ($aKeys as $sKey) {
         $oTemplatePower->assign($sKey, $aRow[$sKey]);
     }
     $aUsers = array($_GET['USR_UID']);
     $aAux1 = $oTasks->getGroupsOfTask($aRow['TAS_UID'], 1);
     foreach ($aAux1 as $aGroup) {
         $aAux2 = $oGroups->getUsersOfGroup($aGroup['GRP_UID']);
         foreach ($aAux2 as $aUser) {
             if (!in_array($aUser['USR_UID'], $aUsers)) {
                 $aUsers[] = $aUser['USR_UID'];
                 $aData = $oUser->load($aUser['USR_UID']);
                 $oTemplatePower->newBlock('users');
                 $oTemplatePower->assign('USR_UID', $aUser['USR_UID']);
                 $oTemplatePower->assign('USR_FULLNAME', $aData['USR_FIRSTNAME'] . ' ' . $aData['USR_LASTNAME'] . ' (' . $aData['USR_USERNAME'] . ')');
             }
         }
     }
     $aAux1 = $oTasks->getUsersOfTask($aRow['TAS_UID'], 1);
     foreach ($aAux1 as $aUser) {
         if (!in_array($aUser['USR_UID'], $aUsers)) {
             $aUsers[] = $aUser['USR_UID'];
             $aData = $oUser->load($aUser['USR_UID']);
开发者ID:rodrigoivan,项目名称:processmaker,代码行数:31,代码来源:users_DeleteReassign.php

示例11: Tasks

 $oDataset->next();
 $c = 0;
 G::LoadClass('tasks');
 $oTasks = new Tasks();
 G::LoadClass('groups');
 $oGroups = new Groups();
 require_once 'classes/model/Users.php';
 $oUser = new Users();
 $name = '';
 while ($aRow = $oDataset->getRow()) {
     $c++;
     $aUsr = array();
     $aUsrUid = array();
     $aAux1 = $oTasks->getGroupsOfTask($aRow['TAS_UID'], 1);
     foreach ($aAux1 as $value1) {
         $aAux2 = $oGroups->getUsersOfGroup($value1['GRP_UID']);
         foreach ($aAux2 as $value2) {
             if ($aRow['USR_UID'] != $value2['USR_UID']) {
                 if (!in_array($value2['USR_UID'], $aUsrUid)) {
                     //var_dump($aRow['USR_UID'], $value2['USR_UID']);echo '<br /><br />';
                     $aAux = $oUser->load($value2['USR_UID']);
                     $aUsr[$aAux['USR_FIRSTNAME'] . ' ' . $aAux['USR_LASTNAME']] = $aAux;
                     $aUsrUid[] = $value2['USR_UID'];
                 }
             }
         }
     }
     $aUsers = $oTasks->getUsersOfTask($aRow['TAS_UID'], 1);
     foreach ($aUsers as $key => $value) {
         if ($aRow['USR_UID'] != $value['USR_UID']) {
             if (!in_array($value['USR_UID'], $aUsrUid)) {
开发者ID:nshong,项目名称:processmaker,代码行数:31,代码来源:cases_Reassign.php

示例12: getTaskUserSelfService

 public function getTaskUserSelfService($tas_uid, $appFields)
 {
     $oTask = new \Tasks();
     $oGroup = new \Groups();
     $taskNextDel = \TaskPeer::retrieveByPK($tas_uid);
     $arrayTaskUser = array();
     if ($taskNextDel->getTasAssignType() == "SELF_SERVICE" && trim($taskNextDel->getTasGroupVariable()) != "") {
         // Self Service Value Based Assignment
         $nextTaskGroupVariable = trim($taskNextDel->getTasGroupVariable(), " @#");
         if (isset($appFields["APP_DATA"][$nextTaskGroupVariable])) {
             $dataGroupVariable = $appFields["APP_DATA"][$nextTaskGroupVariable];
             $dataGroupVariable = is_array($dataGroupVariable) ? $dataGroupVariable : trim($dataGroupVariable);
             if (!empty($dataGroupVariable) && is_array($dataGroupVariable)) {
                 $arrayTaskUser[] = $dataGroupVariable;
             } elseif (!empty($dataGroupVariable)) {
                 $arrayUsersOfGroup = $oGroup->getUsersOfGroup($dataGroupVariable);
                 foreach ($arrayUsersOfGroup as $arrayUser) {
                     $arrayTaskUser[] = $arrayUser["USR_UID"];
                 }
             }
         }
     } else {
         // Self Service
         $arrayGroupsOfTask = $oTask->getGroupsOfTask($tas_uid, 1);
         foreach ($arrayGroupsOfTask as $arrayGroup) {
             $arrayUsersOfGroup = $oGroup->getUsersOfGroup($arrayGroup["GRP_UID"]);
             foreach ($arrayUsersOfGroup as $arrayUser) {
                 $arrayTaskUser[] = $arrayUser["USR_UID"];
             }
         }
         $arrayUsersOfTask = $oTask->getUsersOfTask($tas_uid, 1);
         foreach ($arrayUsersOfTask as $arrayUser) {
             $arrayTaskUser[] = $arrayUser["USR_UID"];
         }
     }
     return $arrayTaskUser;
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:37,代码来源:NotificationDevice.php


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