public function isUnique($username, $email, $dni = null, $code = null)
    {
        $entities = $this->getEm()->getRepository("AmulenUserBundle:User")->findByUniques($username, $email, $dni, $code);
        return count($entities) <= 0;
    }