Commit f4d25059e1f37867673c2daac03607984cd7432e

Authored by eduardo.batista
1 parent a2d67f41
Exists in master and in 1 other branch desenv

[FEAT] Adicionando id da unidade atual no retorno do método autenticar

Showing 1 changed file with 3 additions and 2 deletions   Show diff stats
rn/MdWsSeiUsuarioRN.php
@@ -159,9 +159,10 @@ class MdWsSeiUsuarioRN extends InfraRN { @@ -159,9 +159,10 @@ class MdWsSeiUsuarioRN extends InfraRN {
159 if(!$ret){ 159 if(!$ret){
160 throw new InfraException('Usuário ou senha inválido!'); 160 throw new InfraException('Usuário ou senha inválido!');
161 } 161 }
162 -  
163 - 162 + $this->setaVariaveisAutenticacao(get_object_vars($ret));
  163 + $ret->id_unidade_atual = SessaoSEI::getInstance()->getNumIdUnidadeAtual();
164 $token = $this->tokenEncode($usuarioDTO->getStrSigla(), $usuarioDTO->getStrSenha()); 164 $token = $this->tokenEncode($usuarioDTO->getStrSigla(), $usuarioDTO->getStrSenha());
  165 +
165 return MdWsSeiRest::formataRetornoSucessoREST(null, array('loginData'=> $ret, 'token' => $token)); 166 return MdWsSeiRest::formataRetornoSucessoREST(null, array('loginData'=> $ret, 'token' => $token));
166 }catch (Exception $e){ 167 }catch (Exception $e){
167 return MdWsSeiRest::formataRetornoErroREST($e); 168 return MdWsSeiRest::formataRetornoErroREST($e);