Skip to content

Commit

Permalink
EZP-28703: Error 400 after trying to register new user (ezsystems#213)
Browse files Browse the repository at this point in the history
  • Loading branch information
webhdx authored and Łukasz Serwatka committed Jan 26, 2018
1 parent 47e9bed commit ca5f042
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/Data/Mapper/UserRegisterMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ public function mapToFormData()
$data = new UserRegisterData([
'contentType' => $contentType,
'mainLanguageCode' => $this->params['language'],
'enabled' => true,
]);
$data->addParentGroup($this->parentGroupLoader->loadGroup());

Expand Down
2 changes: 1 addition & 1 deletion lib/Form/EventSubscriber/UserFieldsSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ private function handleUserCreateData(UserCreateData $data)
$data->login = $userAccountFieldData->username;
$data->email = $userAccountFieldData->email;
$data->password = $userAccountFieldData->password;
$data->enabled = $userAccountFieldData->enabled;
$data->enabled = $data->enabled ?? $userAccountFieldData->enabled;

/** @var Value $userValue */
$userValue = clone $data->contentType
Expand Down

0 comments on commit ca5f042

Please sign in to comment.