Created
November 2, 2013 19:46
-
-
Save ppeiris/7282759 to your computer and use it in GitHub Desktop.
This file contains 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
private function setResetToken($accountid) { | |
try { | |
$token = uniqid().uniqid(); /** Generate a unique token */ | |
$tAccounts = new \Entity\Tables\tAccounts(); | |
$newReset = new \Entity\Tables\tAccountPasswordReset(); | |
$newReset->setTAccount($tAccounts); | |
$newReset->accountId = $accountid; | |
$newReset->resetToken = $token; | |
$this->entityManager->persist($newReset); | |
$this->entityManager->flush(); | |
return $token; | |
} catch (Exception $e) { | |
throw $e; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment