Using the doctrine in symfony2, I have a simple user model with the following fields:
Username Email Password
How to download a model based on email address?
$user = $this->getDoctrine() ->getRepository('YourBundle:User') ->findOneBy(array('email' => $email));
Read the official doctrine orm documentation about this