public function load(ObjectManager $manager) { $user = new User(); $user->setUsername('superadmin'); $user->setFirstname('Super'); $user->setLastname('Admin'); $user->setPassword(password_hash('123456', PASSWORD_BCRYPT)); $user->setEmail('*****@*****.**'); $user->setCreatedAt(new \DateTime()); $user->setStatus(User::STATUS_ACTIVE); $user->setGroup($this->getReference('super_group')); $manager->persist($user); $manager->flush(); }