]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Repository/EntryRepository.php
Merge remote-tracking branch 'origin/master' into 2.2
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Repository / EntryRepository.php
index 8704a2a6d2fb1062f3b17c2b36b016349c55d563..14616d8889e7dc2f2d60d93b60beb73e9e87e15f 100644 (file)
@@ -332,14 +332,15 @@ class EntryRepository extends EntityRepository
 
     /**
      * Remove all entries for a user id.
-     * Used when a user want to reset all informations
+     * Used when a user want to reset all informations.
      *
-     * @param  int $userId
+     * @param int $userId
      */
     public function removeAllByUserId($userId)
     {
         $this->getEntityManager()
-            ->createQuery('DELETE FROM Wallabag\CoreBundle\Entity\Entry e WHERE e.user = '.$userId)
+            ->createQuery('DELETE FROM Wallabag\CoreBundle\Entity\Entry e WHERE e.user = :userId')
+            ->setParameter('userId', $userId)
             ->execute();
     }
 }