symfony2 - Doctrine - check if record exists based on field -
using doctrine in symfony2, have simple user model next fields:
username email password
how can load model based on email address?
$user = $this->getdoctrine() ->getrepository('yourbundle:user') ->findoneby(array('email' => $email));
please read the official doctrine orm documentation this
symfony2 doctrine2
No comments:
Post a Comment