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


PHP UsersPeer::doSelectRs方法代码示例

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


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

示例1: 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

示例2: getUsersToReassign


//.........这里部分代码省略.........



        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)) {

                $row[] = $RBAC->aUserInfo['USER_INFO']['USR_UID'];

            }

        }



        $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();

        }



        if ($PRO_UID != null) {

            //Add supervisor

            // Users

            $oCriteria = new Criteria('workflow');

            $oCriteria->addSelectColumn(ProcessUserPeer::PU_UID);

            $oCriteria->addSelectColumn(ProcessUserPeer::USR_UID);

            $oCriteria->addSelectColumn(ProcessUserPeer::PRO_UID);

            $oCriteria->addSelectColumn(UsersPeer::USR_FIRSTNAME);

            $oCriteria->addSelectColumn(UsersPeer::USR_LASTNAME);
开发者ID:nhenderson,项目名称:processmaker,代码行数:67,代码来源:class.case.php

示例3: get_ajax_value

     //$value= $_POST['functions'];
     $value = get_ajax_value('functions');
 }
 switch ($value) {
     case 'verifyUsername':
         //print_r($_POST); die;
         $_POST['sOriginalUsername'] = get_ajax_value('sOriginalUsername');
         $_POST['sUsername'] = get_ajax_value('sUsername');
         if ($_POST['sOriginalUsername'] == $_POST['sUsername']) {
             echo '0';
         } else {
             require_once 'classes/model/Users.php';
             G::LoadClass('Users');
             $oUser = new Users();
             $oCriteria = $oUser->loadByUsername($_POST['sUsername']);
             $oDataset = UsersPeer::doSelectRs($oCriteria, Propel::getDbConnection('workflow_ro'));
             $oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
             $oDataset->next();
             $aRow = $oDataset->getRow();
             //print_r($aRow); die;
             //if (!$aRow)
             if (!is_array($aRow)) {
                 echo '0';
             } else {
                 echo '1';
             }
         }
         break;
     case 'availableUsers':
         G::LoadClass('processMap');
         $oProcessMap = new ProcessMap();
开发者ID:emildev35,项目名称:processmaker,代码行数:31,代码来源:users_Ajax.php


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