Skip to content

Commit

Permalink
Merge pull request from GHSA-wwvf-8p58-hh38
Browse files Browse the repository at this point in the history
* EZP-32165: Fix for newly created users being always enabled

* EZP-32165: Applied review remark

* EZP-32165: CS

* EZP-32165: Fixed UserFieldsSubscriber instead
  • Loading branch information
barw4 authored Jun 25, 2021
1 parent 56b8070 commit f9ccc3f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
6 changes: 0 additions & 6 deletions lib/Data/Mapper/UserCreateMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,7 @@
class UserCreateMapper
{
/**
* @param ContentType $contentType
* @param UserGroup[] $parentGroups
* @param array $params
*
* @return UserCreateData
*
* @throws UndefinedOptionsException
* @throws OptionDefinitionException
Expand Down Expand Up @@ -64,8 +60,6 @@ public function mapToFormData(ContentType $contentType, array $parentGroups, arr
}

/**
* @param OptionsResolver $optionsResolver
*
* @throws AccessException
*/
private function configureOptions(OptionsResolver $optionsResolver): void
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 = $data->enabled ?? $userAccountFieldData->enabled;
$data->enabled = $userAccountFieldData->enabled ?? $data->enabled;

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

0 comments on commit f9ccc3f

Please sign in to comment.