Browse Source

Alter "+" to "@"

main
lucas cardoso 2 years ago
parent
commit
0317da0e50
  1. 6
      app/Controllers/AuthController.php

6
app/Controllers/AuthController.php

@ -236,14 +236,14 @@ class AuthController extends Controller implements IModule
} }
$empresaSimples = EmpresaModel::ArrayTo(get_object_vars($ret_empresa[0])); $empresaSimples = EmpresaModel::ArrayTo(get_object_vars($ret_empresa[0]));
$usuarios = $this->usuarioRepository->list(['matricula' => $empresaSimples->id . '+' . $body['matricula']]); $usuarios = $this->usuarioRepository->list(['matricula' => $empresaSimples->id . '@' . $body['matricula']]);
//verifica se existe agente //verifica se existe agente
if (empty($usuarios)) { if (empty($usuarios)) {
$id_usuario = $this->usuarioRepository->create(new UsuarioModel( $id_usuario = $this->usuarioRepository->create(new UsuarioModel(
id: null, id: null,
nome: $body['nome'], nome: $body['nome'],
email: $body['email'], email: $body['email'],
matricula: $empresaSimples->id . '+' . $body['matricula'], matricula: $empresaSimples->id . '@' . $body['matricula'],
status: $body['status'] == "t" ? true : false, status: $body['status'] == "t" ? true : false,
perm: $body['perm'], perm: $body['perm'],
)); ));
@ -269,7 +269,7 @@ class AuthController extends Controller implements IModule
$this->retorno( $this->retorno(
"Usuario validado com sucesso", "Usuario validado com sucesso",
true, true,
[['matricula' => $empresaSimples->id . '+' . $body['matricula']]] [['matricula' => $empresaSimples->id . '@' . $body['matricula']]]
) )
); );
} catch (Throwable $ex) { } catch (Throwable $ex) {

Loading…
Cancel
Save