public function findByRoleId($roleId)
    {
        $select = $this->getSelect($this->getUserTableName());
        $select->where(array($this->getTableName() . '.role_id' => $roleId));
        $select->join(
            $this->getTableName(),
            $this->getTableName(). '.user_id = ' . $this->getUserTableName(). '.user_id',
            array(),
            Select::JOIN_INNER
        );
        $select->group($this->getUserTableName(). '.user_id');

        $entityPrototype = $this->getZfcUserOptions()->getUserEntityClass();

        return $this->select($select, new $entityPrototype, $this->getZfcUserHydrator());
    }
public function findByRoleId($roleId)
    {
        $select = $this->getSelect($this->getUserTableName());
        $select->where(array($this->getTableName() . '.role_id' => $roleId));
        $select->join(
            $this->getTableName(),
            $this->getTableName(). '.user_id = ' . $this->getUserTableName(). '.user_id',
            array(),
            Select::JOIN_INNER
        );
        $select->group($this->getUserTableName(). '.user_id');

        $entityPrototype = $this->getZfcUserOptions()->getUserEntityClass();

        return $this->select($select, new $entityPrototype, $this->getZfcUserHydrator());
    }
public function findByRoleId ( $ roleId ) { $ select = $ this -> getSelect ( $ this -> getUserTableName ( ) ) ; $ select -> where ( array ( $ this -> getTableName ( ) . '.role_id' => $ roleId ) ) ; $ select -> join ( $ this -> getTableName ( ) , $ this -> getTableName ( ) . '.user_id = ' . $ this -> getUserTableName ( ) . '.user_id' , array ( ) , Select :: JOIN_INNER ) ; $ select -> group ( $ this -> getUserTableName ( ) . '.user_id' ) ; $ entityPrototype = $ this -> getZfcUserOptions ( ) -> getUserEntityClass ( ) ; return $ this -> select ( $ select , new $ entityPrototype , $ this -> getZfcUserHydrator ( ) ) ; }
Finds users with a specific role

@param  string                               $roleId
@return Zend\Db\ResultSet\HydratingResultSet
Finds users with a specific role