@@ -397,6 +397,9 @@ public function setChildrenTitles($titles)
397397 $ expectedChildren = $ this ->getRequireExistingPassword () ? 3 : 2 ;
398398 if (is_array ($ titles ) && count ($ titles ?? []) === $ expectedChildren ) {
399399 foreach ($ this ->getChildren () as $ field ) {
400+ if ($ field instanceof DatalessField) {
401+ continue ;
402+ }
400403 if (isset ($ titles [0 ])) {
401404 $ field ->setTitle ($ titles [0 ]);
402405
@@ -496,11 +499,11 @@ public function validate(): ValidationResult
496499 }
497500 $ this ->beforeExtending ('updateValidate ' , function (ValidationResult $ result ) {
498501 $ name = $ this ->name ;
499-
502+
500503 $ this ->getPasswordField ()->setValue ($ this ->value );
501504 $ this ->getConfirmPasswordField ()->setValue ($ this ->confirmValue );
502505 $ value = $ this ->getPasswordField ()->getValue ();
503-
506+
504507 // both password-fields should be the same
505508 if ($ value != $ this ->getConfirmPasswordField ()->getValue ()) {
506509 $ result ->addFieldError (
@@ -510,7 +513,7 @@ public function validate(): ValidationResult
510513 );
511514 return ;
512515 }
513-
516+
514517 if (!$ this ->canBeEmpty ) {
515518 // both password-fields shouldn't be empty
516519 if (!$ value || !$ this ->getConfirmPasswordField ()->getValue ()) {
@@ -522,7 +525,7 @@ public function validate(): ValidationResult
522525 return ;
523526 }
524527 }
525-
528+
526529 // lengths
527530 $ minLength = $ this ->getMinLength ();
528531 $ maxLength = $ this ->getMaxLength ();
@@ -561,7 +564,7 @@ public function validate(): ValidationResult
561564 return ;
562565 }
563566 }
564-
567+
565568 if ($ this ->getRequireStrongPassword ()) {
566569 $ strongEnough = ConstraintValidator::validate (
567570 $ value ,
@@ -579,7 +582,7 @@ public function validate(): ValidationResult
579582 return ;
580583 }
581584 }
582-
585+
583586 // Check if current password is valid
584587 if (!empty ($ value ) && $ this ->getRequireExistingPassword ()) {
585588 if (!$ this ->currentPasswordValue ) {
@@ -593,7 +596,7 @@ public function validate(): ValidationResult
593596 );
594597 return ;
595598 }
596-
599+
597600 // Check this password is valid for the current user
598601 $ member = Security::getCurrentUser ();
599602 if (!$ member ) {
@@ -607,7 +610,7 @@ public function validate(): ValidationResult
607610 );
608611 return ;
609612 }
610-
613+
611614 // With a valid user and password, check the password is correct
612615 $ authenticators = Security::singleton ()->getApplicableAuthenticators (Authenticator::CHECK_PASSWORD );
613616 foreach ($ authenticators as $ authenticator ) {
0 commit comments