Skip to content
Snippets Groups Projects
Commit 96166646 authored by Jean-Laurent DUZANT's avatar Jean-Laurent DUZANT
Browse files

FIX #17671 TIME 0:05 add check if array group exist

parent 41462aef
No related branches found
No related tags found
No related merge requests found
......@@ -245,7 +245,7 @@ class UserController
return $response->withStatus(400)->withJson(['errors' => 'Body email is empty or not a valid email']);
} elseif (!empty($body['x509Fingerprint']) && !Validator::stringType()->validate($body['x509Fingerprint'])) {
return $response->withStatus(400)->withJson(['errors' => 'Body x509Fingerprint is not a string']);
} elseif (!Validator::arrayType()->each(Validator::intType())->validate($body['groups'])) {
} elseif (!empty($body['groups']) && !Validator::arrayType()->each(Validator::intType())->validate($body['groups'])) {
return $response->withStatus(400)->withJson(['errors' => 'Body groups is not an array of integers']);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment