From 8dc9963e98537f960a8a829a1c8a245c6fce50e5 Mon Sep 17 00:00:00 2001 From: Ruben Date: Fri, 16 Sep 2016 00:53:49 +0100 Subject: [PATCH] Fix query bug --- src/Models/UserRepository.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Models/UserRepository.php b/src/Models/UserRepository.php index e9bab80..721d742 100644 --- a/src/Models/UserRepository.php +++ b/src/Models/UserRepository.php @@ -84,7 +84,7 @@ class UserRepository extends EntityRepository implements UserProviderInterface public function getRankForUser(User $user) { $query = $this->_em->createQuery( - "SELECT COUNT(u.id) FROM ".User::class." u WHERE totalScore >= :totalScore" + "SELECT COUNT(u.id) FROM ".User::class." u WHERE u.totalScore >= :totalScore" ) ->setParameters([ 'totalScore' => $user->getTotalScore(),