X-Git-Url: https://git.rapsys.eu/airbundle/blobdiff_plain/69a888d9341349a25ba800313f9f14bb638e6ca5..aecd79b0af016492323465e0526dbbbd94178976:/Repository/UserRepository.php diff --git a/Repository/UserRepository.php b/Repository/UserRepository.php index 9b34057..3918551 100644 --- a/Repository/UserRepository.php +++ b/Repository/UserRepository.php @@ -41,9 +41,9 @@ FROM ( u.pseudonym, g.id AS g_id, g.title AS g_title - FROM RapsysAirBundle:User AS u - JOIN RapsysAirBundle:UserGroup AS gu ON (gu.user_id = u.id) - JOIN RapsysAirBundle:Group AS g ON (g.id = gu.group_id) + FROM Rapsys\AirBundle\Entity\User AS u + JOIN Rapsys\AirBundle\Entity\UserGroup AS gu ON (gu.user_id = u.id) + JOIN Rapsys\AirBundle\Entity\Group AS g ON (g.id = gu.group_id) WHERE g.title <> 'User' ORDER BY g.id DESC, u.pseudonym ASC LIMIT 0, :limit @@ -116,8 +116,8 @@ SELECT FROM ( SELECT u.id - FROM RapsysAirBundle:User AS u - LEFT JOIN RapsysAirBundle:UserGroup AS gu ON (gu.user_id = u.id) + FROM Rapsys\AirBundle\Entity\User AS u + LEFT JOIN Rapsys\AirBundle\Entity\UserGroup AS gu ON (gu.user_id = u.id) WHERE u.pseudonym IN (:pseudonym) ORDER BY gu.group_id DESC, u.pseudonym ASC LIMIT 0, :limit @@ -156,8 +156,8 @@ SQL; //Set the request $req =<< $id) { //Add role - $roles[$role = 'ROLE_'.strtoupper($titles[$k])] = $role; + //XXX: roles are keyes by id + $roles[$id] = 'ROLE_'.strtoupper($titles[$k]); //Add group $groups[$id] = $this->translator->trans($titles[$k]); @@ -402,14 +403,14 @@ FROM ( u.pseudonym, g.id AS g_id, g.title AS g_title - FROM RapsysAirBundle:User AS u - JOIN RapsysAirBundle:UserGroup AS gu ON (gu.user_id = u.id) - JOIN RapsysAirBundle:Group AS g ON (g.id = gu.group_id) + FROM Rapsys\AirBundle\Entity\User AS u + JOIN Rapsys\AirBundle\Entity\UserGroup AS gu ON (gu.user_id = u.id) + JOIN Rapsys\AirBundle\Entity\Group AS g ON (g.id = gu.group_id) ORDER BY NULL LIMIT 0, :limit ) AS c - LEFT JOIN RapsysAirBundle:Application AS a ON (a.user_id = c.id) - LEFT JOIN RapsysAirBundle:Dance AS d ON (d.id = a.dance_id) + LEFT JOIN Rapsys\AirBundle\Entity\Application AS a ON (a.user_id = c.id) + LEFT JOIN Rapsys\AirBundle\Entity\Dance AS d ON (d.id = a.dance_id) GROUP BY d.id ORDER BY NULL LIMIT 0, :limit