From d3cf892001725beceb5b339a2cc7aa5b5a4d4c27 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Mon, 26 Feb 2024 17:50:52 +1300 Subject: [PATCH] Named params --- app/controllers/api/users.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/controllers/api/users.php b/app/controllers/api/users.php index 5fa62a3730..491a371eb0 100644 --- a/app/controllers/api/users.php +++ b/app/controllers/api/users.php @@ -71,7 +71,14 @@ function createUser(string $hash, mixed $hashOptions, string $userId, ?string $e : ID::custom($userId); if ($project->getAttribute('auths', [])['personalDataCheck'] ?? false) { - $personalDataValidator = new PersonalData($userId, $email, $name, $phone, false, true); + $personalDataValidator = new PersonalData( + $userId, + $email, + $name, + $phone, + strict: false, + allowEmpty: true + ); if (!$personalDataValidator->isValid($plaintextPassword)) { throw new Exception(Exception::USER_PASSWORD_PERSONAL_DATA); }