Skip to content

Commit

Permalink
Merge pull request #128 from rn0/binary_passwd_2
Browse files Browse the repository at this point in the history
Convert random binary bytes to hexadecimal representation
  • Loading branch information
szymach authored Nov 27, 2019
2 parents 536182b + 8863a30 commit 61967fd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion EventListener/PrepareUserListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public function prepareAndDispatchUserCreated(FormEvent $event): void

$entity->setEnabled(false);
$entity->enforcePasswordChange(true);
$entity->setPlainPassword(random_bytes(32));
$entity->setPlainPassword(bin2hex(random_bytes(32)));

$this->eventDispatcher->dispatch(
AdminSecurityEvents::USER_CREATED,
Expand Down

0 comments on commit 61967fd

Please sign in to comment.