public function indexAction()
    {
        $allowed_users = array();
        $users = $this->getDoctrine()->getManager()->createQuery('SELECT r FROM FOMUserBundle:User r')->getResult();

        // ACL access check
        foreach ($users as $index => $user) {
            if ($this->isGranted('VIEW', $user)) {
                $allowed_users[] = $user;
            }
        }

        $oid = new ObjectIdentity('class', 'FOM\UserBundle\Entity\User');

        return array(
            'users'             => $allowed_users,
            'create_permission' => $this->isGranted('CREATE', $oid)
        );
    }
public function indexAction()
    {
        $allowed_users = array();
        $users = $this->getDoctrine()->getManager()->createQuery('SELECT r FROM FOMUserBundle:User r')->getResult();

        // ACL access check
        foreach ($users as $index => $user) {
            if ($this->isGranted('VIEW', $user)) {
                $allowed_users[] = $user;
            }
        }

        $oid = new ObjectIdentity('class', 'FOM\UserBundle\Entity\User');

        return array(
            'users'             => $allowed_users,
            'create_permission' => $this->isGranted('CREATE', $oid)
        );
    }
public function indexAction ( ) { $ allowed_users = array ( ) ; $ users = $ this -> getDoctrine ( ) -> getManager ( ) -> createQuery ( 'SELECT r FROM FOMUserBundle:User r' ) -> getResult ( ) ; // ACL access check foreach ( $ users as $ index => $ user ) { if ( $ this -> isGranted ( 'VIEW' , $ user ) ) { $ allowed_users [ ] = $ user ; } } $ oid = new ObjectIdentity ( 'class' , 'FOM\UserBundle\Entity\User' ) ; return array ( 'users' => $ allowed_users , 'create_permission' => $ this -> isGranted ( 'CREATE' , $ oid ) ) ; }
Renders user list.

@ManagerRoute("/user")
@Method({ "GET" })
@Template
Renders user list .