Using doctrine in symfony2, i have a simple user model with the following fields:
Username Email Password
How can I load the model based on email address?
$user = $this->getDoctrine() ->getRepository('YourBundle:User') ->findOneBy(array('email' => $email));
Please read the official doctrine orm documentation about this
1.4m articles
1.4m replys
5 comments
57.0k users