From 1d0e313dbc0efd643c2d515d0b21fb9b15a5b157 Mon Sep 17 00:00:00 2001 From: afornerot Date: Thu, 20 Jul 2023 20:20:41 +0200 Subject: [PATCH] admin --- src/Command/InitCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Command/InitCommand.php b/src/Command/InitCommand.php index 061b31c..c19bba7 100755 --- a/src/Command/InitCommand.php +++ b/src/Command/InitCommand.php @@ -51,7 +51,7 @@ class InitCommand extends Command $metadata = $this->em->getClassMetaData('App\Entity\User'); $metadata->setIdGeneratorType(ClassMetadata::GENERATOR_TYPE_NONE); $metadata->setIdGenerator(new AssignedGenerator()); - $user = $this->em->getRepository('App\Entity\User')->findOneBy(['id' => '-1']); + $user = $this->em->getRepository('App\Entity\User')->findOneBy(['username' => 'admin']); if (!$user) { $user = new User(); $user->setId(-1);