public function findById($id) { $dm = $this->getDocumentManager(); $class = $this->options->getUserEntityClass(); $user = $dm->getRepository($class)->findOneBy(array('id' => $id)); return $user; }
public function findById($id) { $er = $this->em->getRepository($this->options->getUserEntityClass()); return $er->find($id); }