diff --git a/backend/src/Controller/UserController.php b/backend/src/Controller/UserController.php index 4bee261..f8f2f0f 100644 --- a/backend/src/Controller/UserController.php +++ b/backend/src/Controller/UserController.php @@ -96,12 +96,12 @@ class UserController extends Controller $newUser = new User(); - if (!isset($projectData['username'])) { + if (!isset($projectData['username']) || empty($projectData['username'])) { return new ErrorResponse(0, "You must provide a username"); } $newUser->setUsername($projectData['username']); - if (!isset($projectData['password'])) { + if (!isset($projectData['password']) || empty($projectData['password'])) { return new ErrorResponse(1, "You must provide a password"); } $newUser->setPassword($passwordEncoder->encodePassword(