Don't reset additional registration form elements on init default elements (#7461)

This commit is contained in:
Yuriy Bakhtin 2025-03-13 13:43:22 +01:00 committed by GitHub
parent 163d948e6b
commit c8be19776f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -94,8 +94,9 @@ class Registration extends HForm
*/
protected function setFormDefinition()
{
$this->definition = [];
$this->definition['elements'] = [];
if (!isset($this->definition['elements']) || !is_array($this->definition['elements'])) {
$this->definition['elements'] = [];
}
$this->definition['elements']['User'] = $this->getUserFormDefinition();
$this->definition['elements']['GroupUser'] = $this->getGroupFormDefinition();
if ($this->enablePasswordForm) {