public function insertAdmin($username, $email, $password)
{
$doctrine = $this->getContainer()->get('doctrine');
$em = $doctrine->getManager();
$user = $em->getRepository('OjsUserBundle:User')->findOneBy(array('email' => $email));
if (is_null($user)) {
$user = $em->getRepository('OjsUserBundle:User')->findOneBy(array('username' => $username));
}
if (is_null($user)) {
$kernel = $this->getContainer()->get('kernel');
$application = new Application($kernel);
$application->setAutoExit(false);
$application->run(new StringInput('fos:user:create --super-admin ' . $username . ' ' . $email . ' ' . $password));
}
}