From 8863a30faf7500c90b4835d1f69bfcd0cdc84171 Mon Sep 17 00:00:00 2001 From: Piotr Date: Wed, 27 Nov 2019 12:28:43 +0100 Subject: [PATCH] Convert random binary bytes to hexadecimal representation --- EventListener/PrepareUserListener.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EventListener/PrepareUserListener.php b/EventListener/PrepareUserListener.php index 94048f87..9f2b097b 100644 --- a/EventListener/PrepareUserListener.php +++ b/EventListener/PrepareUserListener.php @@ -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,