public function load(ObjectManager $manager)
 {
     //create superuser
     $superuser = new Superuser();
     $superuser->setUsername(self::SUPERUSER_NAME);
     $superuser->setEmail(self::SUPERUSER_EMAIL);
     //encode password according configuration
     $factory = $this->container->get('security.encoder_factory');
     $encoder = $factory->getEncoder($superuser);
     $password = $encoder->encodePassword(self::SUPERUSER_PASSWORD, $superuser->getSalt());
     $superuser->setPassword($password);
     $this->addReference('superuser', $superuser);
     $manager->persist($superuser);
     $manager->flush();
 }
 public function setEmail($email)
 {
     $this->__load();
     return parent::setEmail($email);
 }