Exemplo n.º 1
0
     if ($permission->Check('user', 'view') == FALSE) {
         if ($permission->Check('user', 'view_child')) {
             $filter_data['permission_children_ids'] = $permission_children_ids;
         }
         if ($permission->Check('user', 'view_own')) {
             $filter_data['permission_children_ids'][] = $current_user->getId();
         }
     }
     Debug::Text('Users in company only!', __FILE__, __LINE__, __METHOD__, 10);
     $ulf->getSearchByCompanyIdAndArrayCriteria($current_company->getId(), $filter_data, $current_user_prefs->getItemsPerPage(), $page, NULL, $sort_array);
 }
 $pager = new Pager($ulf);
 if ($permission->Check('company', 'view')) {
     $clf = new CompanyListFactory();
     $clf->getAll($current_company->getId());
     $company_options = $clf->getArrayByListFactory($clf, FALSE, TRUE);
 }
 //Get title list,
 $utlf = new UserTitleListFactory();
 $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));
 foreach ($ulf as $u_obj) {
     $company_name = $clf->getById($u_obj->getCompany())->getCurrent()->getName();