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,