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


PHP UserListFactory::getByID方法代码示例

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


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

示例1: setUser

 function setUser($id)
 {
     $id = trim($id);
     $ulf = new UserListFactory();
     if ($id == 0 or $this->Validator->isResultSetWithRows('user', $ulf->getByID($id), TTi18n::gettext('Invalid User'))) {
         $this->data['user_id'] = $id;
         return TRUE;
     }
     return FALSE;
 }
开发者ID:J-P-Hanafin,项目名称:TimeTrex-1,代码行数:10,代码来源:UserIdentificationFactory.class.php

示例2: setIncludeUser

 function setIncludeUser($id)
 {
     $id = trim($id);
     $ulf = new UserListFactory();
     if ($this->Validator->isResultSetWithRows('include_user', $ulf->getByID($id), TTi18n::gettext('Selected User is invalid'))) {
         $this->data['user_id'] = $id;
         return TRUE;
     }
     return FALSE;
 }
开发者ID:J-P-Hanafin,项目名称:TimeTrex-1,代码行数:10,代码来源:StationIncludeUserFactory.class.php

示例3: setUser

 function setUser($id)
 {
     $id = trim($id);
     $ulf = new UserListFactory();
     if ($id != 0 and $this->Validator->isResultSetWithRows('user', $ulf->getByID($id), TTi18n::gettext('Selected Employee is invalid')) and $this->Validator->isTrue('user', $this->isUniqueUser($id), TTi18n::gettext('Selected Employee is already assigned to another Permission Group'))) {
         $this->data['user_id'] = $id;
         return TRUE;
     }
     return FALSE;
 }
开发者ID:J-P-Hanafin,项目名称:TimeTrex-1,代码行数:10,代码来源:PermissionUserFactory.class.php

示例4: BranchListFactory

 $utlf->getByCompanyId($current_company->getId());
 $title_options = $utlf->getArrayByListFactory($utlf, FALSE, TRUE);
 $blf = new BranchListFactory();
 $blf->getByCompanyId($current_company->getId());
 $branch_options = $blf->getArrayByListFactory($blf, FALSE, TRUE);
 $dlf = new DepartmentListFactory();
 $dlf->getByCompanyId($current_company->getId());
 $department_options = $dlf->getArrayByListFactory($dlf, FALSE, TRUE);
 $uglf = new UserGroupListFactory();
 $group_options = $uglf->getArrayByNodes(FastTree::FormatArray($uglf->getByCompanyIdArray($current_company->getId()), 'TEXT', TRUE));
 $rstclf = new RecurringScheduleTemplateControlListFactory();
 $template_options = $rstclf->getByCompanyIdArray($current_company->getId(), FALSE, TRUE);
 foreach ($rsclf as $rsc_obj) {
     $user_id = $rsc_obj->getColumn('user_id');
     $ulf = new UserListFactory();
     $ulf->getByID($user_id);
     if ($ulf->getRecordCount() == 1) {
         $u_obj = $ulf->getCurrent();
     } else {
         //Skip this row.
         Debug::Text('Skipping Row: User ID: ' . $user_id, __FILE__, __LINE__, __METHOD__, 10);
         continue;
     }
     $rows[] = array('id' => $rsc_obj->getId(), 'user_id' => $user_id, 'name' => $rsc_obj->getColumn('name'), 'description' => $rsc_obj->getColumn('description'), 'start_week' => $rsc_obj->getStartWeek(), 'start_date' => $rsc_obj->getStartDate(), 'end_date' => $rsc_obj->getEndDate(), 'first_name' => $u_obj->getFirstName(), 'middle_name' => $u_obj->getMiddleName(), 'last_name' => $u_obj->getLastName(), 'user_full_name' => $u_obj->getFullName(TRUE), 'is_owner' => $permission->isOwner($u_obj->getCreatedBy(), $u_obj->getId()), 'is_child' => $permission->isChild($u_obj->getId(), $permission_children_ids), 'deleted' => $rsc_obj->getDeleted());
 }
 $all_array_option = array('-1' => TTi18n::gettext('-- Any --'));
 $ulf->getSearchByCompanyIdAndArrayCriteria($current_company->getId(), $filter_data);
 $filter_data['user_options'] = Misc::prependArray($all_array_option, UserListFactory::getArrayByListFactory($ulf, FALSE, TRUE));
 //Select box options;
 $filter_data['template_options'] = Misc::prependArray($all_array_option, $template_options);
 $filter_data['branch_options'] = Misc::prependArray($all_array_option, $branch_options);
开发者ID:J-P-Hanafin,项目名称:TimeTrex-1,代码行数:31,代码来源:RecurringScheduleControlList.php

示例5: setUser

 function setUser($id)
 {
     $id = trim($id);
     $ulf = new UserListFactory();
     $hllf = new HierarchyLevelListFactory();
     if ($id != 0 and $this->Validator->isResultSetWithRows('user', $ulf->getByID($id), TTi18n::gettext('Selected Employee is invalid')) and $this->Validator->isNotResultSetWithRows('user', $hllf->getByHierarchyControlIdAndUserId($this->getHierarchyControl(), $id), TTi18n::gettext('Selected employee is assigned as both a superior and subordinate')) and $this->Validator->isTrue('user', $this->isUniqueUser($id), TTi18n::gettext('Selected Employee is already assigned to another hierarchy'))) {
         $this->data['user_id'] = $id;
         return TRUE;
     }
     return FALSE;
 }
开发者ID:J-P-Hanafin,项目名称:TimeTrex-1,代码行数:11,代码来源:HierarchyUserFactory.class.php

示例6: setSupportContact

 function setSupportContact($id)
 {
     $id = trim($id);
     $ulf = new UserListFactory();
     if (!empty($id) and $this->Validator->isResultSetWithRows('support_contact', $ulf->getByID($id), TTi18n::gettext('Contact User is invalid'))) {
         $this->data['support_contact'] = $id;
         return TRUE;
     }
     return FALSE;
 }
开发者ID:J-P-Hanafin,项目名称:TimeTrex-1,代码行数:10,代码来源:CompanyFactory.class.php

示例7: setStatusBy

 function setStatusBy($id = NULL)
 {
     $id = trim($id);
     if (empty($id)) {
         global $current_user;
         if (is_object($current_user)) {
             $id = $current_user->getID();
         } else {
             return FALSE;
         }
     }
     $ulf = new UserListFactory();
     if ($this->Validator->isResultSetWithRows('created_by', $ulf->getByID($id), TTi18n::gettext('Incorrect User'))) {
         $this->data['status_by'] = $id;
         return TRUE;
     }
     return FALSE;
 }
开发者ID:J-P-Hanafin,项目名称:TimeTrex-1,代码行数:18,代码来源:PayStubFactory.class.php

示例8: setObject

 function setObject($user_id)
 {
     if (!empty($user_id)) {
         $ulf = new UserListFactory();
         $ulf->getByID($user_id);
         foreach ($ulf as $user) {
             $this->obj = $user;
             return TRUE;
         }
     }
     return FALSE;
 }
开发者ID:J-P-Hanafin,项目名称:TimeTrex-1,代码行数:12,代码来源:Authentication.class.php

示例9: setUser

 function setUser($id)
 {
     $id = trim($id);
     $ulf = new UserListFactory();
     $hulf = new HierarchyUserListFactory();
     if ($this->getHierarchyControl() == FALSE) {
         return FALSE;
     }
     //Get user object so we can get the users full name to display as an error message.
     $ulf->getById($id);
     if ($id == 0 or $ulf->getRecordCount() > 0 and $this->Validator->isResultSetWithRows('user', $ulf->getByID($id), TTi18n::gettext('Invalid Employee')) and $this->Validator->isNotResultSetWithRows('user', $hulf->getByHierarchyControlAndUserId($this->getHierarchyControl(), $id), TTi18n::gettext($ulf->getCurrent()->getFullName() . ' is assigned as both a superior and subordinate'))) {
         $this->data['user_id'] = $id;
         return TRUE;
     }
     return FALSE;
 }
开发者ID:J-P-Hanafin,项目名称:TimeTrex-1,代码行数:16,代码来源:HierarchyLevelFactory.class.php

示例10: setUser

 function setUser($id)
 {
     $id = trim($id);
     //Allow NULL ids.
     if ($id == '' or $id == NULL) {
         $id = 0;
     }
     $ulf = new UserListFactory();
     if ($id == 0 or $this->Validator->isResultSetWithRows('user', $ulf->getByID($id), TTi18n::gettext('User is invalid'))) {
         $this->data['user_id'] = $id;
         return TRUE;
     }
     return FALSE;
 }
开发者ID:J-P-Hanafin,项目名称:TimeTrex-1,代码行数:14,代码来源:LogFactory.class.php


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