1
0
Fork 0
mirror of synced 2024-06-29 19:50:26 +12:00

Named params

This commit is contained in:
Jake Barnby 2024-02-26 17:50:52 +13:00
parent a08d5a5ef6
commit d3cf892001
No known key found for this signature in database
GPG key ID: C437A8CC85B96E9C

View file

@ -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);
}