admin
This commit is contained in:
parent
bd06832205
commit
1d0e313dbc
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user