Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
sistema_mcid
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
marcio neto
sistema_mcid
Commits
8deab9d0
Commit
8deab9d0
authored
Aug 29, 2023
by
sandroresende
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
correcao limite usuario
parent
024efa2b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
+19
-0
EntePublicoController.php
app/Http/Controllers/Sistema/EntePublicoController.php
+19
-0
No files found.
app/Http/Controllers/Sistema/EntePublicoController.php
View file @
8deab9d0
...
...
@@ -57,8 +57,27 @@ class EntePublicoController extends Controller
DB
::
beginTransaction
();
$where
=
[];
$where
[]
=
[
'ente_publico_id'
,
$request
->
txt_cnpj
];
$where
[]
=
[
'status_usuario_id'
,
'<='
,
2
];
$enteUsuarios
=
User
::
where
(
$where
)
->
get
();
if
(
count
(
$enteUsuarios
)
>
5
){
DB
::
rollBack
();
flash
()
->
erro
(
"Erro"
,
"Este Ente Público já atingiu o limite de 5 usuários para acesso ao sistema."
);
return
back
();
}
$possuiUsuarioCPF
=
User
::
where
(
'txt_cpf_usuario'
,
$request
->
txt_cpf_usuario
)
->
get
();
$possuiUsuarioEmail
=
User
::
where
(
'email'
,
$request
->
email
)
->
get
();
if
(
count
(
$possuiUsuarioCPF
)
>
0
){
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment