Created
March 21, 2017 09:06
-
-
Save MikSDigital/766680cf1621228bcdf644b78c8f7458 to your computer and use it in GitHub Desktop.
dbl
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public function getIdByEmail($sEmail) | |
| { | |
| $aResult = $this->getEntityManager() | |
| ->createQuery("SELECT user.id FROM EducationBaseBundle:User user WHERE user.mail = :mail") | |
| ->setParameter('mail', $sEmail) | |
| ->getOneOrNullResult(); | |
| if (isset($aResult['id'])) { | |
| return $aResult['id']; | |
| } | |
| return 0; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment