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


PHP Model_User::getUserById方法代码示例

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


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

示例1: indexAction

 public function indexAction()
 {
     //$this->_redirect('/?cache');
     //desabilita layout
     //$this->_helper->layout()->disableLayout();
     //echo "teste";
     $this->cache = Zend_Registry::get('cache_FS');
     $devol = new Model_User();
     $user = $devol->getUserById(66);
     //var_dump('user: ', $user);
     echo "<br><br><br>";
     //var_dump('cache: ', $this->cache);
     $userCache = $this->cache->load('userCache');
     echo "<br><br><br>";
     //var_dump('userCache: ', $userCache);
     //recupera do cache
     if ($userCache == false) {
         //add fechall from db into cache
         $this->cache->save($user, 'userCache');
     }
     echo "<br><br>------------------------";
     $this->cache->save('conteudo variavel teste2 eh este!!', 'teste2');
     $this->cache->save('conteudo variavel teste3 eh este!!', 'teste3');
     echo "<br>teste2: " . $this->cache->load('teste2');
     echo "<br>teste3: " . $this->cache->load('teste3');
 }
开发者ID:Lazaro-Gallo,项目名称:psmn,代码行数:26,代码来源:CacheController.php

示例2: redirect

$u = $p = "";
if (isset($_POST['edit_user'])) {
    if ($_POST['txtuser'] == NULL) {
        $error[] = "Please input your username";
    } else {
        $u = $_POST['txtuser'];
    }
    if ($_POST['txtpass'] != $_POST['txtrepass']) {
        $error[] = "Password not match";
    } else {
        if ($_POST['txtpass'] != "") {
            $p = $_POST['txtpass'];
        } else {
            $p = "none";
        }
    }
    $l = $_POST['level'];
    if ($u && $p && $l) {
        $muser->setUsername($u);
        $muser->setPassword($p);
        $muser->setLevel($l);
        if ($muser->checkUsername($id) == true) {
            $muser->updateUser($id);
            redirect("{$baseurl}/user/list");
        } else {
            $error[] = "Your user name has been registed";
        }
    }
}
$data = $muser->getUserById($id);
require "views/user/edit_view.php";
开发者ID:ntsasng,项目名称:app,代码行数:31,代码来源:edit.php

示例3: getEnterpriseData

 /**
  * 
  * @param type $userId
  * @return type
  */
 public function getEnterpriseData($userId)
 {
     $User = new Model_User();
     $President = new Model_President();
     $Enterprise = new Model_Enterprise();
     $UserLocality = new Model_UserLocality();
     $AddressEnterprise = new Model_AddressEnterprise();
     //$userId = 81;
     $userRow = $User->getUserById($userId);
     $userLocalityRow = $UserLocality->getUserLocalityByUserId($userRow->getId());
     $enterpriseRow = $Enterprise->getEnterpriseById($userLocalityRow->getEnterpriseId());
     $presidentRow = $President->getPresidentByEnterpriseId($enterpriseRow->getId());
     $addressEnterpriseRow = $AddressEnterprise->getAddressEnterpriseByEnterpriseId($enterpriseRow->getId());
     $arrAnnualRevenue = Vtx_Util_Array::annualRevenue();
     $neighborhood = $addressEnterpriseRow->findParentNeighborhood();
     $arrEnterprise = array('Registro OCB' => $enterpriseRow->getOcbRegister() != '' ? $enterpriseRow->getOcbRegister() : '', 'Razão Social' => $enterpriseRow->getSocialName() != '' ? $enterpriseRow->getSocialName() : '', 'E-mail' => $enterpriseRow->getEmailDefault() != '' ? $enterpriseRow->getEmailDefault() : '', 'Nome Fantasia' => $enterpriseRow->getFantasyName() != '' ? $enterpriseRow->getFantasyName() : '', 'Ramo de Atividade' => $enterpriseRow->getMetierId() ? DbTable_Metier::getInstance()->getById($enterpriseRow->getMetierId())->getDescription() : '', 'Atividade Econômica(CNAE)' => $enterpriseRow->getCnae() != '' ? $enterpriseRow->getCnae() : '', 'CPF/CNPJ' => $enterpriseRow->getCnpj() != '' ? Vtx_Util_Formatting::maskFormat($enterpriseRow->getCnpj(), '##.###.###/####-##') : '', 'Porte da Empresa' => $enterpriseRow->getAnnualRevenue() != '' && isset($arrAnnualRevenue[$enterpriseRow->getAnnualRevenue()]) ? $arrAnnualRevenue[$enterpriseRow->getAnnualRevenue()] : '', 'Número de Colaboradores' => $enterpriseRow->getEmployeesQuantity() != '' ? $enterpriseRow->getEmployeesQuantity() : '', 'Data de Abertura' => $enterpriseRow->getCreationDate() != '' ? Vtx_Util_Date::format_dma($enterpriseRow->getCreationDate()) : '', 'Endereço' => is_object($addressEnterpriseRow) ? $addressEnterpriseRow->getStreetNameFull() : '', 'Número' => is_object($addressEnterpriseRow) ? $addressEnterpriseRow->getStreetNumber() : '', 'Complemento' => is_object($addressEnterpriseRow) ? $addressEnterpriseRow->getStreetCompletion() : '', 'Bairro' => $neighborhood ? $addressEnterpriseRow->findParentNeighborhood()->getName() : '', 'Cidade/Estado' => is_object($addressEnterpriseRow) ? DbTable_City::getInstance()->getById($addressEnterpriseRow->getCityId())->getName() . "/" . DbTable_State::getInstance()->getById($addressEnterpriseRow->getStateId())->getUf() : '', 'CEP' => is_object($addressEnterpriseRow) ? Vtx_Util_Formatting::maskFormat($addressEnterpriseRow->getCep(), '#####-###') : '');
     $arrContact = array('Nome' => is_object($presidentRow) ? $presidentRow->getName() : '', 'Cargo' => is_object($presidentRow) ? 'Presidente' : '', 'Telefone' => is_object($presidentRow) ? $presidentRow->getPhone() : '', 'E-mail' => is_object($presidentRow) ? $presidentRow->getEmail() : '', 'Cpf' => Vtx_Util_Formatting::maskFormat($presidentRow->getCpf(), '###.###.###-##'));
     $arrIssues = array('0' => array('Q' => '1. É uma Matriz?', 'R' => $enterpriseRow->getHeadOfficeStatus() == '1' ? 'Sim' : 'Não'), '1' => array('Q' => '2. É uma Singular?', 'R' => $enterpriseRow->getSingularStatus() == '1' ? 'Sim' : 'Não'), '2' => array('Q' => '3. A empresa está vinculada a alguma Central?', 'R' => $enterpriseRow->getCentralName() != '' ? $enterpriseRow->getCentralName() : 'Não'), '3' => array('Q' => '4. A empresa está vinculada a alguma Federação?', 'R' => $enterpriseRow->getFederationName() != '' ? $enterpriseRow->getFederationName() : 'Não'), '4' => array('Q' => '5. A empresa está vinculada a alguma Confederação?', 'R' => $enterpriseRow->getConfederationName() != '' ? $enterpriseRow->getConfederationName() : 'Não'));
     return array($arrEnterprise, $arrContact, $arrIssues);
 }
开发者ID:Lazaro-Gallo,项目名称:psmn,代码行数:25,代码来源:DevolutiveVerificador.php

示例4: action_editUser

 public function action_editUser()
 {
     $this->template->show_logout = TRUE;
     $this->template->title = 'Edit user';
     $id = $this->request->param('id');
     $id = isset($_POST['id']) ? $_POST['id'] : $id;
     $user = Model_User::getUserById($id);
     $errors = array();
     if ($_POST) {
         if (isset($_POST['role'])) {
             unset($_POST['role']);
         }
         //
         if ($user['email'] == $_POST['email']) {
             unset($_POST['email']);
         } else {
             if (Model_User::checkEmailExists($_POST['email'])) {
                 $errors[] = 'E-mail address is taken!';
             }
         }
         //
         if ($user['username'] == $_POST['username']) {
             unset($_POST['username']);
         } else {
             if (Model_User::checkUsernameExists($_POST['username'])) {
                 $errors[] = 'Username is taken!';
             }
         }
         //
         if ($_POST['password'] == '') {
             unset($_POST['password']);
         } else {
             $_POST['password'] = Auth::instance()->hash_password($_POST['password']);
         }
         //
         if (empty($errors)) {
             Model_User::editUser($_POST, $_POST['id']);
             $this->redirect('dashboard/users');
         } else {
             $user = Model_User::getUserById($_POST['id']);
         }
     }
     $view = $this->template->content = View::factory('dashboard/users/edit')->set('errors', $errors)->set('user', $user);
     $this->response->body($view);
 }
开发者ID:alextoshinov,项目名称:musyme,代码行数:45,代码来源:Dashboard.php

示例5: getEnterpriseData

 /**
  * dados da empresa
  * 
  * @param type $userId
  * @return type
  */
 public function getEnterpriseData($userId)
 {
     $User = new Model_User();
     //$President = new Model_President();
     $Enterprise = new Model_Enterprise();
     $UserLocality = new Model_UserLocality();
     $AddressEnterprise = new Model_AddressEnterprise();
     $Position = new Model_Position();
     $userRow = $User->getUserById($userId);
     $userLocalityRow = $UserLocality->getUserLocalityByUserId($userRow->getId());
     $enterpriseRow = $Enterprise->getEnterpriseById($userLocalityRow->getEnterpriseId());
     //var_dump('EnterpriseId: ',$enterpriseRow->getId());
     //$presidentRow = $President->getPresidentByEnterpriseId($enterpriseRow->getId());
     $addressEnterpriseRow = $AddressEnterprise->getAddressEnterpriseByEnterpriseId($enterpriseRow->getId());
     $arrAnnualRevenue = Vtx_Util_Array::annualRevenue();
     $arrCategoria = Vtx_Util_Array::categoriaMpe();
     $idCategoria = $enterpriseRow->getCategoriaId();
     $nomeCategoria = "";
     if (is_int($idCategoria)) {
         $nomeCategoria = $arrCategoria[$idCategoria];
     }
     $arrTipoEmpresa = Vtx_Util_Array::tipoEmpresaMPE();
     $idTipoEmpresa = $enterpriseRow->getEnterpriseTypeId();
     $tipoEmpresa = "";
     if (is_int($idTipoEmpresa)) {
         $tipoEmpresa = $arrTipoEmpresa[$idTipoEmpresa];
     }
     // var_dump('addressEnterpriseRow: ',$addressEnterpriseRow);
     // exit;
     $neighborhood = $addressEnterpriseRow->findParentNeighborhood();
     //var_dump('neighborhood: ',$neighborhood);
     $idUf = $addressEnterpriseRow->getStateId();
     $idCidade = $addressEnterpriseRow->getCityId();
     //var_dump($idCidade);
     //var_dump($idUf);
     if (is_int($idUf)) {
         $uf = DbTable_State::getInstance()->getById($idUf)->getUf();
     } else {
         $uf = "";
     }
     if (is_int($idCidade)) {
         $cidade = DbTable_City::getInstance()->getById($idCidade)->getName();
     } else {
         $cidade = "";
     }
     $cidadeEstado = $cidade . "/" . $uf;
     //var_dump ($cidadeEstado); exit;
     //var_dump($cidadeEstado);
     //exit;
     $cnpj = $enterpriseRow->getCnpj();
     if (is_string($cnpj)) {
         $cpfCnpj = $cnpj;
     } else {
         $cpfCnpj = "";
     }
     //$cnpjMask = Vtx_Util_Formatting::maskFormat($getcnpj,'##.###.###/####-##');
     //$cnpj = null;
     //var_dump($cnpj);
     //exit;
     $arrEnterprise = array('Razão Social' => $enterpriseRow->getSocialName() != '' ? $enterpriseRow->getSocialName() : '', 'E-mail' => $enterpriseRow->getEmailDefault() != '' ? $enterpriseRow->getEmailDefault() : '', 'Nome Fantasia' => $enterpriseRow->getFantasyName() != '' ? $enterpriseRow->getFantasyName() : '', 'Atividade Econômica(CNAE)' => $enterpriseRow->getCnae() != '' ? $enterpriseRow->getCnae() : '', 'CPF/CNPJ' => $cpfCnpj, 'Faturamento Anual' => $enterpriseRow->getAnnualRevenue() != '' && isset($arrAnnualRevenue[$enterpriseRow->getAnnualRevenue()]) ? $arrAnnualRevenue[$enterpriseRow->getAnnualRevenue()] : '', 'Número de Colaboradores' => $enterpriseRow->getEmployeesQuantity() != '' ? $enterpriseRow->getEmployeesQuantity() : '0', 'Data de Abertura' => $enterpriseRow->getCreationDate() != '' ? Vtx_Util_Date::format_dma($enterpriseRow->getCreationDate()) : '', 'Endereço' => is_object($addressEnterpriseRow) ? $addressEnterpriseRow->getStreetNameFull() : '', 'Número' => is_object($addressEnterpriseRow) ? $addressEnterpriseRow->getStreetNumber() : '', 'Complemento' => is_object($addressEnterpriseRow) ? $addressEnterpriseRow->getStreetCompletion() : '', 'Bairro' => $neighborhood ? $addressEnterpriseRow->findParentNeighborhood()->getName() : '', 'Cidade/Estado' => $cidadeEstado, 'CEP' => is_object($addressEnterpriseRow) ? Vtx_Util_Formatting::maskFormat($addressEnterpriseRow->getCep(), '#####-###') : '', 'Categoria' => $nomeCategoria, 'Tipo Empresa' => $tipoEmpresa);
     $idPosition = $userRow->getPositionId();
     $cargo = "";
     if (is_int($idPosition)) {
         $posicao = $Position->getPosition($idPosition);
         $cargo = $posicao ? $posicao->getDescription() : '';
     }
     $arrContact = array('Nome' => is_object($userRow) ? $userRow->getNomeCompleto() : '', 'Cargo' => is_object($userRow) ? $cargo : '', 'Telefone' => is_object($userRow) ? $userRow->getTelefone() : '', 'Celular' => is_object($userRow) ? $userRow->getCelular() : '', 'E-mail' => is_object($userRow) ? $userRow->getEmail() : '');
     $arrIssues = array();
     return array($arrEnterprise, $arrContact, $arrIssues);
 }
开发者ID:Lazaro-Gallo,项目名称:psmn,代码行数:76,代码来源:getEnterpriseData.php

示例6: makePdfDevolutiveAutoAvaliacaoExecuta

 /**
  * 
  * @param type $questionnaireId
  * @param type $userId
  * @param type $dirName
  * @param type $publicDir
  * @param type $arqName
  * @param type $isRA
  * @return type
  */
 public function makePdfDevolutiveAutoAvaliacaoExecuta($questionnaireId, $userId, $programaId, $dirName, $publicDir, $arqName, $isRA = false, $conclusao = false)
 {
     $modelEnterprise = new Model_Enterprise();
     $modelUser = new Model_User();
     $isRAWithConclusion = $conclusao;
     $objUser = $modelUser->getUserById($userId);
     $objEnterprise = $modelEnterprise->getEnterpriseByUserId($userId);
     $programaTipo = Zend_Registry::get('programaTipo');
     $isSebraeMais = $programaTipo == 'SebraeMais' ? TRUE : FALSE;
     if ($arrBlocksResult = $this->Questionnaire->getBlocksAutoavaliacao($questionnaireId)) {
         //$governancaBlockId = $arrBlocksResult[0];
         //Pegar ID do Zend Registry - setar em DevolutiveController - indexAction
         //Parte 1 - Gestao da Empresa
         $gestaoBlockId = $this->objDevolutive->getBlockIdGestaoEmpresa();
         //50;
         //Parte 2 - Comportamento Empreendededor - igual parte 2 do PSMN
         $comportamentoBlockId = $this->objDevolutive->getBlockIdEmpreendedorismo();
         //51
         //Parte 3 - Responsabilidade Social
         $responsabilidadeSocialBlockId = $this->objDevolutive->getBlockIdResponsabilidadeSocial();
         //52
         //Parte 4 - Praticas Inovacao
         $praticasInovacaoBlockId = $this->objDevolutive->getBlockIdPraticasInovacao();
         //53
         $enterpriseData = new Vtx_Devolutive_Tipo_MPE_getEnterpriseData();
         $arrayDevolutive = new Vtx_Devolutive_Tipo_MPE_getArrayDevolutive();
         //$arrayDevolutiveRAA->getArrayDevolutiveRAA($questionnaireId, $userId, $blockId);
         if (self::OK_DADOS_CADASTRO) {
             list($arrEnterprise, $arrContact, $arrIssues) = $enterpriseData->getEnterpriseData($userId);
         }
         if (self::OK_PARTE_1) {
             //Bloco Gestao da Empresa
             list($arrDevolutiveGes, $arrBlocksGes, $arrCriteriaGes, $arrQuestionnaire) = $arrayDevolutive->getArrayDevolutiveReturn($questionnaireId, $userId, $programaId, $gestaoBlockId);
         }
         if (self::OK_PARTE_2) {
             //Bloco Comportamento Empreendedor
             list($arrDevolutiveBlockId2, $arrBlocksBlockId2, $arrCriteriaBlockId2, $arrQuestionnaire) = $arrayDevolutive->getArrayDevolutiveReturn($questionnaireId, $userId, $programaId, $comportamentoBlockId);
         }
         if (self::OK_PARTE_3) {
             //Bloco Responsabilidade Social
             list($arrDevolutiveBlockId3, $arrBlocksBlockId3, $arrCriteriaBlockId3, $arrQuestionnaire) = $arrayDevolutive->getArrayDevolutiveReturn($questionnaireId, $userId, $programaId, $responsabilidadeSocialBlockId);
             //var_dump ('arrDevolutiveBlockId3: ', $arrDevolutiveBlockId3);
             //echo "<br>";
         }
         if (self::OK_PARTE_4) {
             //Bloco Praticas Inovacao
             list($arrDevolutiveBlockId4, $arrBlocksBlockId4, $arrCriteriaBlockId4, $arrQuestionnaire) = $arrayDevolutive->getArrayDevolutiveReturn($questionnaireId, $userId, $programaId, $praticasInovacaoBlockId);
         }
         if (self::OK_PARTE_1) {
             //dados para Grafico Radar
             list($arrRadarDataGes, $arrTabulationGes, $arrPunctuationGes) = $this->Questionnaire->getRadarData($questionnaireId, $gestaoBlockId, $userId, $programaId);
         }
         $strPathRadar = false;
         if (self::OK_PARTE_1) {
             //ano ciclo
             $qto_operation_beginning = utf8_decode($arrQuestionnaire['operation_beginning']);
             $dta_tmp = explode("/", $qto_operation_beginning);
             $str_ciclo = $dta_tmp[2];
             $this->setStrCiclo($str_ciclo);
             $makeRadarPlot = new Vtx_Devolutive_Tipo_MPE_makeRadarPlot();
             $strPathRadar = $makeRadarPlot->makeRadarPlot($arrCriteriaGes, $arrRadarDataGes, $arrTabulationGes, $arrPunctuationGes, $dirName, $str_ciclo);
             //obj StdClass com dados completos para a tabela de pontuacao
             $objDadosPontuacao = $makeRadarPlot->dadosTabelaPontuacao();
             $makeScoreRAA = new Vtx_Devolutive_Tipo_MPE_makeScoreRAA();
             //$makeScoreRAA->makeScoreRAA($questionnaireId, $userId);
             //seta variaveis para pontuacao do bloco Gestao Empresa
             //em model devolutive tem o metodo que grava esta pontuacao na tb ExecutionPontuacao
             $this->objDevolutive->setGravaPontuacaoGestaoEmpresa(true);
             //$gravaPontuacaoGestaoEmpresa
             $this->objDevolutive->setArrPunctuationGes($arrPunctuationGes);
             //$arrPunctuationGes
             $arrScores = $makeScoreRAA->makeScoreRAA($questionnaireId, $userId, $programaId);
             $scorePart1 = $arrScores['IsgcScore'];
             $scorePart2 = $arrScores['IsgScore'];
         }
         // Desabilita header e footer
         //$pdf->header = 0;
         //$pdf->footer = 0;
         $this->header = 0;
         $this->footer = 0;
         // Prepara variáveis para paginação
         $this->AliasNbPages();
         //insere pdfs da devolutiva
         $pagina = $this->pagina = 1;
         $offSet = 0;
         // Habilita header e footer
         $this->header = 1;
         // Anterior [-] $this->AddPage();
         $this->footer = 1;
         ######## nova CAPA #############################################
//.........这里部分代码省略.........
开发者ID:Lazaro-Gallo,项目名称:psmn,代码行数:101,代码来源:MPE.php

示例7: setPassword

 /**
  * altera password do usuario
  *
  * @param type $IdUser
  * @return type
  */
 public function setPassword($IdUser)
 {
     $senhaRandon = substr(uniqid(), -8);
     //pass com 8 caracteres
     $senhaToMd5 = md5($senhaRandon);
     $pass = Vtx_Util_String::hashMe($senhaToMd5);
     $keypass = $pass['sha'];
     $salt = $pass['salt'];
     $User = new Model_User();
     $userRowData = $User->getUserById($IdUser);
     $userRowData->setKeypass($keypass);
     $userRowData->setSalt($salt);
     $userRowData->save();
     return array('status' => true, 'senhaRandon' => $senhaRandon, 'userObj' => $userRowData);
 }
开发者ID:Lazaro-Gallo,项目名称:psmn,代码行数:21,代码来源:Enterprise.php

示例8: editAction

 public function editAction()
 {
     $Acl = Zend_Registry::get('acl');
     $auth = Zend_Auth::getInstance();
     $User = new Model_User();
     $President = new Model_President();
     $PresidentProgram = new Model_PresidentProgram();
     $modelLogCadastroEmpresa = new Model_LogCadastroEmpresa();
     $UserLocality = new Model_UserLocality();
     $AddressEnterprise = new Model_AddressEnterprise();
     $AddressPresident = new Model_AddressPresident();
     $this->_helper->viewRenderer->setRender('index');
     $this->view->editStatus = false;
     $this->view->editByAdmin = false;
     if ($this->_getParam('id_key') and ($Acl->isAllowed($this->userLogged->getRole(), 'questionnaire:register', 'publisher') or $Acl->isAllowed($this->userLogged->getRole(), 'questionnaire:register', 'acompanhacadastro'))) {
         $enterpriseIdKey = $this->_getParam('id_key');
         $enterpriseRow = $this->Enterprise->getEnterpriseByIdKey($enterpriseIdKey);
         $userLocalityGetEnterprise = $UserLocality->getUserLocalityByEnterpriseId($enterpriseRow->getId());
         if (!$userLocalityGetEnterprise) {
             throw new Exception('Nenhum usuário relacionado nesta empresa.');
         }
         $this->view->editStatus = true;
         $this->view->enterpriseIdKey = $enterpriseIdKey;
         $userId = $userLocalityGetEnterprise->getUserId();
         $this->view->editByAdmin = true;
     } else {
         $userId = $this->userLogged->getUserId();
     }
     $userRow = $User->getUserById($userId);
     $userLocalityRow = $UserLocality->getUserLocalityByUserId($userRow->getId());
     $enterpriseRow = $this->Enterprise->getEnterpriseById($userLocalityRow->getEnterpriseId());
     $presidentRow = $President->getPresidentByEnterpriseId($enterpriseRow->getId());
     $addressPresidentRow = $AddressPresident->getAddressPresidentByPresidentId($presidentRow->getId());
     $presidentProgramRow = $PresidentProgram->getAllPresidentProgramByPresidentId($presidentRow->getId());
     $addressEnterpriseRow = $AddressEnterprise->getAddressEnterpriseByEnterpriseId($enterpriseRow->getId());
     $logCadastradoPor = $modelLogCadastroEmpresa->getLogCadastroEmpresaByEnterpriseId($enterpriseRow->getId());
     $cadastroNome = 'Site';
     $cadastroCriadoEm = '00:00:00';
     if ($logCadastradoPor) {
         if ($logCadastradoPor->getUserIdLog() != $userLocalityRow->getUserId()) {
             $cadastroNome = $User->getUserById($logCadastradoPor->getUserIdLog())->getFirstName();
         }
         $cadastroCriadoEm = $logCadastradoPor->getCriadoEm();
     }
     $this->view->logCadastroEmpresa = array('NomeCadastro' => $cadastroNome, 'CriadoEm' => $cadastroCriadoEm);
     if (!$enterpriseRow || !$presidentRow) {
         throw new Exception('Usuário inválido, não encontrado.');
     }
     $this->view->userIdview = $userId;
     $this->view->enterpriseIdview = $enterpriseRow->getId();
     //        $modelQuest = new Model_Questionnaire();
     //
     //        $arrTerminoEtapas = $modelQuest->terminoEtapas($enterpriseRow, $userId);
     //
     //        var_dump($arrTerminoEtapas);
     $this->view->getAllStates = $this->State->getAll();
     if ($addressEnterpriseRow) {
         $this->view->getAllCities = $this->City->getAllCityByStateId($addressEnterpriseRow->getStateId());
         //$this->view->getAllNeighborhoods = $this->Neighborhood->getAllNeighborhoodByCityId($addressEnterpriseRow->getCityId());
         $this->view->getAllNeighborhoods = $addressEnterpriseRow->getCityId() ? $this->Neighborhood->getAllNeighborhoodByCityId($addressEnterpriseRow->getCityId()) : null;
     }
     if ($addressPresidentRow) {
         $this->view->getAllCitiesPresident = $this->City->getAllCityByStateId($addressPresidentRow->getStateId());
         //$this->view->getAllNeighborhoodsPresident = $this->Neighborhood->getAllNeighborhoodByCityId($addressPresidentRow->getCityId());
         $this->view->getAllNeighborhoodsPresident = $addressPresidentRow->getCityId() ? $this->Neighborhood->getAllNeighborhoodByCityId($addressPresidentRow->getCityId()) : null;
     }
     $this->view->getAllPositions = $this->Position->getAll();
     $this->view->getAllEducations = $this->Education->getAll();
     $this->view->getAllMetier = $this->Metier->getAll();
     $this->view->getAllPresidentProgramType = $this->modelPresidentProgramType->getAll();
     $this->view->hasECAC = $this->modelEnterpriseCategoryAwardCompetition->hasECAC($enterpriseRow->getId(), Zend_Registry::get('configDb')->competitionId);
     $hasntEmail = $enterpriseRow->getHasntEmail();
     $hasntEmail = isset($hasntEmail) ? $hasntEmail : 1;
     $this->view->registerEnterpriseData = array('cnpj' => $enterpriseRow->getCnpj(), 'category_award_id' => $enterpriseRow->getCategoryAwardId(), 'category_sector_id' => $enterpriseRow->getCategorySectorId(), 'state_registration' => $enterpriseRow->getStateRegistration(), 'dap' => $enterpriseRow->getDap(), 'register_ministry_fisher' => $enterpriseRow->getRegisterMinistryFisher(), 'company_history' => $enterpriseRow->getCompanyHistory(), 'site' => $enterpriseRow->getSite(), 'status' => $enterpriseRow->getStatus(), 'social_name' => $enterpriseRow->getSocialName(), 'fantasy_name' => $enterpriseRow->getFantasyName(), 'creation_date' => $enterpriseRow->getCreationDate(), 'employees_quantity' => $enterpriseRow->getEmployeesQuantity(), 'phone' => $enterpriseRow->getPhone(), 'email_default' => $enterpriseRow->getEmailDefault(), 'annual_revenue' => $enterpriseRow->getAnnualRevenue(), 'cnae' => $enterpriseRow->getCnae(), 'nirf' => $enterpriseRow->getNirf(), 'farm_size' => $enterpriseRow->getFarmSize(), 'hasnt_email' => $hasntEmail);
     if ($addressEnterpriseRow) {
         $this->view->registerAddressEnterpriseData = array('cep' => $addressEnterpriseRow->getCep(), 'state_id' => $addressEnterpriseRow->getStateId(), 'city_id' => $addressEnterpriseRow->getCityId(), 'name_full_log' => $addressEnterpriseRow->getStreetNameFull(), 'street_number' => $addressEnterpriseRow->getStreetNumber(), 'street_completion' => $addressEnterpriseRow->getStreetCompletion(), 'neighborhood_id' => $addressEnterpriseRow->getNeighborhoodId());
     }
     $this->view->registerPresidentData = array('enterprise_id' => $presidentRow->getEnterpriseId(), 'education_id' => $presidentRow->getEducationId(), 'position_id' => $presidentRow->getPositionId(), 'find_us_id' => $presidentRow->getFindUsId(), 'nick_name' => $presidentRow->getNickName(), 'cellphone' => $presidentRow->getCellphone(), 'newsletter_email' => $presidentRow->getNewsletterEmail(), 'newsletter_mail' => $presidentRow->getNewsletterMail(), 'newsletter_sms' => $presidentRow->getNewsletterSms(), 'agree' => $presidentRow->getAgree(), 'name' => $presidentRow->getName(), 'cpf' => $presidentRow->getCpf(), 'email' => $presidentRow->getEmail(), 'phone' => $presidentRow->getPhone(), 'born_date' => $presidentRow->getBornDate(), 'gender' => $presidentRow->getGender());
     if ($addressPresidentRow) {
         $this->view->registerAddressPresidentData = array('cep' => $addressPresidentRow->getCep(), 'state_id' => $addressPresidentRow->getStateId(), 'city_id' => $addressPresidentRow->getCityId(), 'name_full_log' => $addressPresidentRow->getStreetNameFull(), 'street_number' => $addressPresidentRow->getStreetNumber(), 'street_completion' => $addressPresidentRow->getStreetCompletion(), 'neighborhood_id' => $addressPresidentRow->getNeighborhoodId());
     }
     $this->view->registerPresidentProgramData = $presidentProgramRow;
     $this->view->registerUserData = array('first_name' => $userRow->getFirstName(), 'surname' => $userRow->getSurname(), 'password_hint' => $userRow->getPasswordHint());
     $this->view->hasEligibility = $hasEligibility = $this->Enterprise->hasEligibilityRules($enterpriseRow->getIdKey());
     if ($this->_getParam('forward', null) == true) {
         return;
     }
     if (!$this->getRequest()->isPost()) {
         return;
     }
     $ficha = $this->_getAllParams();
     $ficha['log_empresa']['user_id_log'] = $this->userLogged->getUserId();
     unset($this->view->editStatus);
     unset($this->view->getAllStates);
     unset($this->view->getAllCities);
     unset($this->view->getAllNeighborhoods);
     unset($this->view->getAllCitiesPresident);
     unset($this->view->getAllNeighborhoodsPresident);
     unset($this->view->getAllPositions);
     unset($this->view->getAllEducations);
//.........这里部分代码省略.........
开发者ID:Lazaro-Gallo,项目名称:psmn,代码行数:101,代码来源:RegisterController.php


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