Commit 5dcc8284c774769735795550239f33bba68dcbee
1 parent
351c3c23
Exists in
master
and in
1 other branch
Obtendo e enviando a quantidade de usuarios ativos
Showing
1 changed file
with
11 additions
and
0 deletions
Show diff stats
rn/MdEstatisticasColetarRN.php
... | ... | @@ -38,6 +38,7 @@ class MdEstatisticasColetarRN extends InfraRN { |
38 | 38 | 'protocolo' => $this->obterProtocolo(), |
39 | 39 | 'quantidadeUnidades' => $this->obterQuantidadeUnidades(), |
40 | 40 | 'quantidadeProcedimentos' => $this->obterQuantidadeProcessosAdministrativos(), |
41 | + 'quantidadeUsuarios' => $this->obterQuantidadeUsuarios(), | |
41 | 42 | 'navegadores' => $this->obterNavegadores(), |
42 | 43 | 'modulos' => $this->obterPlugins(), |
43 | 44 | 'tamanhoFilesystem' => $this->obterTamanhoFileSystem() |
... | ... | @@ -120,6 +121,16 @@ class MdEstatisticasColetarRN extends InfraRN { |
120 | 121 | return $tamanho; |
121 | 122 | } |
122 | 123 | |
124 | + private function obterQuantidadeUsuarios(){ | |
125 | + | |
126 | + $query = "SELECT COUNT(*) as quantidade FROM usuario WHERE sin_ativo = 'S'"; | |
127 | + $rs = BancoSEI::getInstance()->consultarSql($query); | |
128 | + $quantidade = (count($rs) && isset($rs[0]['quantidade'])) ? $rs[0]['quantidade'] : 0; | |
129 | + | |
130 | + InfraDebug::getInstance()->gravar('SEI09 - Quantidade de usuários: ' . $quantidade, InfraLog::$INFORMACAO); | |
131 | + return $quantidade; | |
132 | + } | |
133 | + | |
123 | 134 | private function obterProtocolo(){ |
124 | 135 | $objConfiguracaoSEI = ConfiguracaoSEI::getInstance(); |
125 | 136 | if ($objConfiguracaoSEI->isSetValor('SessaoSEI', 'https')){ | ... | ... |