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


PHP UserFactory::setPermissionControl方法代码示例

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


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

示例1: UserListFactory

     $uf->setTitle($udf_obj->getTitle());
     $uf->setCity($udf_obj->getCity());
     if ($udf_obj->getProvince() != '' and $udf_obj->getProvince() != 0) {
         $uf->setProvince($udf_obj->getProvince());
     }
     if ($udf_obj->getCountry() != '') {
         $uf->setCountry($udf_obj->getCountry());
     }
     $uf->setWorkPhone($udf_obj->getWorkPhone());
     $uf->setWorkPhoneExt($udf_obj->getWorkPhoneExt());
     $uf->setWorkEmail($udf_obj->getWorkEmail());
     $uf->setHireDate($udf_obj->getHireDate());
     $uf->setDefaultBranch($udf_obj->getDefaultBranch());
     $uf->setDefaultDepartment($udf_obj->getDefaultDepartment());
     if ($udf_obj->getPermissionControl() != '') {
         $uf->setPermissionControl($udf_obj->getPermissionControl());
     }
     if ($udf_obj->getPayPeriodSchedule() != '') {
         $uf->setPayPeriodSchedule($udf_obj->getPayPeriodSchedule());
     }
     if ($udf_obj->getPolicyGroup() != '') {
         $uf->setPolicyGroup($udf_obj->getPolicyGroup());
     }
     if ($udf_obj->getCurrency() != '') {
         $uf->setCurrency($udf_obj->getCurrency());
     }
 }
 if ($update_column != FALSE and isset($mapped_row[$update_column])) {
     //Try looking up user by the update column.
     echo "  Looking up User By: {$update_column} (" . $mapped_row[$update_column] . ") - " . str_pad($mapped_row['first_name'] . " " . $mapped_row['last_name'], 20, '.', STR_PAD_RIGHT) . "... ";
     $ulf = new UserListFactory();
开发者ID:alachaum,项目名称:timetrex,代码行数:31,代码来源:import_users.php

示例2: PermissionControlListFactory

     } else {
         $uf->Validator->isTrue($uf->password_validator_label, FALSE, $uf->password_validator_match_msg);
     }
     $uf->setEmployeeNumber(1);
     $uf->setFirstName($user_data['first_name']);
     $uf->setLastName($user_data['last_name']);
     $uf->setWorkEmail($user_data['work_email']);
     //Get Permission Control with highest ID, assume its for Administrators
     //and use it.
     $pclf = new PermissionControlListFactory();
     $pclf->getByCompanyId($user_data['company_id'], NULL, NULL, NULL, array('id' => 'desc'));
     if ($pclf->getRecordCount() > 0) {
         $pc_obj = $pclf->getCurrent();
         if (is_object($pc_obj)) {
             Debug::Text('Adding User to Permission Control: ' . $pc_obj->getId(), __FILE__, __LINE__, __METHOD__, 10);
             $uf->setPermissionControl($pc_obj->getId());
         }
     }
     if ($uf->isValid()) {
         $user_id = $uf->Save();
         $uf->CommitTransaction();
         if ($external_installer == 1) {
             Redirect::Page(URLBuilder::getURL(NULL, 'Done.php'));
         } else {
             Redirect::Page(URLBuilder::getURL(NULL, 'MaintenanceJobs.php'));
         }
         break;
     }
     $uf->FailTransaction();
 default:
     if (isset($company_id)) {
开发者ID:J-P-Hanafin,项目名称:TimeTrex-1,代码行数:31,代码来源:User.php


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