Skip to content

Instantly share code, notes, and snippets.

@ppeiris
Last active December 27, 2015 09:58
Show Gist options
  • Save ppeiris/7307255 to your computer and use it in GitHub Desktop.
Save ppeiris/7307255 to your computer and use it in GitHub Desktop.
<?php
/** Create an object of tAccounts */
$account = $this->entityManager->getRepository('\Entity\Tables\tAccounts');
/** Find a record */
$record = $account->findOneBy(array('userEmail' => $email));
if ($record) {
/** get all the records in the tAccountPasswordReset table that link via foreign key (accountId) */
$resetRecords = $record->getPasswordResets();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment