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


PHP UsersPeer::retrieveByPk方法代码示例

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


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

示例1: executeShow

 public function executeShow()
 {
     $this->users = UsersPeer::retrieveByPk($this->getRequestParameter('id'));
     $c = new Criteria();
     $c->add(RolePeer::ID, $this->users->getRoleId());
     $this->roles = RolePeer::doSelect($c);
     $this->forward404Unless($this->users);
 }
开发者ID:BackupTheBerlios,项目名称:flushcms,代码行数:8,代码来源:actions.class.php

示例2: removeUserFromDepartment

 public function removeUserFromDepartment($DepUid, $UsrUid)
 {
     $aFields = array('USR_UID' => $UsrUid, 'DEP_UID' => '', 'USR_REPORTS_TO' => '');
     try {
         $oUser = UsersPeer::retrieveByPk($UsrUid);
         $user = $oUser->loadDetailed($UsrUid);
         $dptoTitle = $this->Load($DepUid);
         if (is_object($oUser) && get_class($oUser) == 'Users') {
             //$oDepto = new Users();
             $oUser->setDepUid('');
             $oUser->setUsrReportsTo('');
             $oUser->save();
             G::auditLog("RemoveUsersFromDepartament", "Remove user " . $user['USR_USERNAME'] . "( " . $UsrUid . ") from departament " . $dptoTitle['DEPO_TITLE'] . " (" . $DepUid . ") ");
         }
     } catch (exception $oError) {
         throw $oError;
     }
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:18,代码来源:Department.php

示例3: catch

         $userFields = $oUser->toArray(BasePeer::TYPE_FIELDNAME);
         $aFields['USR_REPORTS_TO'] = $userFields['USR_FIRSTNAME'] . ' ' . $userFields['USR_LASTNAME'];
         try {
             $depFields = $oDepInfo->load($userFields['DEP_UID']);
             $aFields['USR_REPORTS_TO'] .= " (" . $depFields['DEPO_TITLE'] . ")";
         } catch (Exception $e) {
         }
     } else {
         $aFields['USR_REPORTS_TO'] = ' ';
     }
 }
 try {
     $depFields = $oDepInfo->load($aFields['DEP_UID']);
     $aFields['USR_DEPARTMENT'] = $depFields['DEPO_TITLE'];
 } catch (Exception $e) {
     $oUser = UsersPeer::retrieveByPk($_GET['USR_UID']);
     $oUser->setDepUid('');
     $oUser->save();
 }
 //Load Calendar options and falue for this user
 G::LoadClass('calendar');
 $calendar = new Calendar();
 $calendarObj = $calendar->getCalendarList(true, true);
 global $_DBArray;
 $_DBArray['availableCalendars'] = $calendarObj['array'];
 $_SESSION['_DBArray'] = $_DBArray;
 $calendarInfo = $calendar->getCalendarFor($_GET['USR_UID'], $_GET['USR_UID'], $_GET['USR_UID']);
 //If the function returns a DEFAULT calendar it means that this object doesn't have assigned any calendar
 $aFields['USR_CALENDAR'] = $calendarInfo['CALENDAR_APPLIED'] != 'DEFAULT' ? $calendarInfo['CALENDAR_UID'] : "";
 $aFields['RANDOM'] = rand();
 /////////////////////////
开发者ID:nshong,项目名称:processmaker,代码行数:31,代码来源:users_Edit.php

示例4: removeUserFromDepartment

 public function removeUserFromDepartment($DepUid, $UsrUid)
 {
     $aFields = array('USR_UID' => $UsrUid, 'DEP_UID' => '', 'USR_REPORTS_TO' => '');
     try {
         $oUser = UsersPeer::retrieveByPk($UsrUid);
         if (is_object($oUser) && get_class($oUser) == 'Users') {
             //$oDepto = new Users();
             $oUser->setDepUid('');
             $oUser->setUsrReportsTo('');
             $oUser->save();
         }
     } catch (exception $oError) {
         throw $oError;
     }
 }
开发者ID:bqevin,项目名称:processmaker,代码行数:15,代码来源:Department.php

示例5: catch

 if (is_object($oUser) && get_class($oUser) == 'Users') {
     $userFields = $oUser->toArray(BasePeer::TYPE_FIELDNAME);
     $aFields['USR_REPORTS_TO'] = $userFields['USR_FIRSTNAME'] . ' ' . $userFields['USR_LASTNAME'];
     try {
         $depFields = $oDepInfo->load($userFields['DEP_UID'] . 'xy<');
         $aFields['USR_REPORTS_TO'] .= " (" . $depFields['DEPO_TITLE'] . ")";
     } catch (Exception $e) {
     }
 } else {
     $aFields['USR_REPORTS_TO'] = ' ';
 }
 try {
     $depFields = $oDepInfo->load($aFields['DEP_UID']);
     $aFields['USR_DEPARTMENT'] = $depFields['DEPO_TITLE'];
 } catch (Exception $e) {
     $oUser = UsersPeer::retrieveByPk($_SESSION['USER_LOGGED']);
     $oUser->setDepUid('');
     $oUser->save();
     $aFields['USR_DEPARTMENT'] = ' ';
 }
 $G_MAIN_MENU = 'processmaker';
 $G_ID_MENU_SELECTED = 'MY_ACCOUNT';
 $G_PUBLISH = new Publisher();
 //$RBAC->systemObj->loadByCode('PROCESSMAKER');//('PROCESSMAKER', $_SESSION['USER_LOGGED']);
 #verifying if it has any preferences on the configurations table
 G::loadClass('configuration');
 $oConf = new Configurations();
 $oConf->loadConfig($x, 'USER_PREFERENCES', '', '', $_SESSION['USER_LOGGED'], '');
 //echo $RBAC->aUserInfo['PROCESSMAKER']['ROLE']['ROL_CODE'];
 //G::pr($RBAC->userObj->load($_SESSION['USER_LOGGED']));
 if (sizeof($oConf->Fields) > 0) {
开发者ID:nshong,项目名称:processmaker,代码行数:31,代码来源:myInfo_Edit.php


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