public function findAll($executeQuery = true, $orderedBy = 'id', $order = null)
    {
        if (!$executeQuery) {
            $dql = "
                SELECT u, pws, g, r, rws
                FROM Claroline\CoreBundle\Entity\User u
                LEFT JOIN u.personalWorkspace pws
                LEFT JOIN u.groups g
                LEFT JOIN u.roles r
                LEFT JOIN r.workspace rws
                WHERE u.isRemoved = false
                ORDER BY u.{$orderedBy} {$order}
            ";

            return $this->_em->createQuery($dql);
        }

        return parent::findAll();
    }
public function findAll($executeQuery = true, $orderedBy = 'id', $order = null)
    {
        if (!$executeQuery) {
            $dql = "
                SELECT u, pws, g, r, rws
                FROM Claroline\CoreBundle\Entity\User u
                LEFT JOIN u.personalWorkspace pws
                LEFT JOIN u.groups g
                LEFT JOIN u.roles r
                LEFT JOIN r.workspace rws
                WHERE u.isRemoved = false
                ORDER BY u.{$orderedBy} {$order}
            ";

            return $this->_em->createQuery($dql);
        }

        return parent::findAll();
    }
public function findAll ( $ executeQuery = true , $ orderedBy = 'id' , $ order = null ) { if ( ! $ executeQuery ) { $ dql = "
                SELECT u, pws, g, r, rws
                FROM Claroline\CoreBundle\Entity\User u
                LEFT JOIN u.personalWorkspace pws
                LEFT JOIN u.groups g
                LEFT JOIN u.roles r
                LEFT JOIN r.workspace rws
                WHERE u.isRemoved = false
                ORDER BY u.{$orderedBy} {$order}
            " ; return $ this -> _em -> createQuery ( $ dql ) ; } return parent :: findAll ( ) ; }
Returns all the users.

@param bool   $executeQuery
@param string $orderedBy
@param null   $order

@return User[]|Query
Returns all the users .