diff --git a/Controller/UserController.php b/Controller/UserController.php index 858db9d07..7b2b013e6 100644 --- a/Controller/UserController.php +++ b/Controller/UserController.php @@ -30,7 +30,9 @@ class UserController extends Controller { $em = $this->getDoctrine()->getManager(); - $entities = $em->getRepository('ChillMainBundle:User')->findAll(); + $entities = $em->createQuery('SELECT u FROM ChillMainBundle:User u ' + . 'ORDER BY u.username') + ->getResult(); return $this->render('ChillMainBundle:User:index.html.twig', array( 'entities' => $entities,