diff --git a/src/GoalioForgotPasswordDoctrineORM/Mapper/Password.php b/src/GoalioForgotPasswordDoctrineORM/Mapper/Password.php index 0236175..4f50ea3 100644 --- a/src/GoalioForgotPasswordDoctrineORM/Mapper/Password.php +++ b/src/GoalioForgotPasswordDoctrineORM/Mapper/Password.php @@ -51,7 +51,7 @@ public function cleanExpiredForgotRequests($expiryTime=86400) public function cleanPriorForgotRequests($userId) { - $dql = sprintf("DELETE %s u WHERE u.user = %s", $this->options->getPasswordEntityClass(), $userId); + $dql = sprintf("DELETE %s u WHERE u.user_id = %s", $this->options->getPasswordEntityClass(), $userId); $query = $this->em->createQuery($dql); $query->getResult(); }