當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。