本文整理汇总了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;
}
示例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);
示例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();