public function getAllSegmentsForSite($idSite, $userLogin)
    {
        $bind = array($idSite, $userLogin);
        $sql  = $this->buildQuerySortedByName('(enable_only_idsite = ? OR enable_only_idsite = 0)
                                               AND deleted = 0
                                               AND (enable_all_users = 1 OR login = ?)');
        $segments = $this->getDb()->fetchAll($sql, $bind);

        return $segments;
    }
public function getAllSegmentsForSite($idSite, $userLogin)
    {
        $bind = array($idSite, $userLogin);
        $sql  = $this->buildQuerySortedByName('(enable_only_idsite = ? OR enable_only_idsite = 0)
                                               AND deleted = 0
                                               AND (enable_all_users = 1 OR login = ?)');
        $segments = $this->getDb()->fetchAll($sql, $bind);

        return $segments;
    }
public function getAllSegmentsForSite ( $ idSite , $ userLogin ) { $ bind = array ( $ idSite , $ userLogin ) ; $ sql = $ this -> buildQuerySortedByName ( '(enable_only_idsite = ? OR enable_only_idsite = 0)
                                               AND deleted = 0
                                               AND (enable_all_users = 1 OR login = ?)' ) ; $ segments = $ this -> getDb ( ) -> fetchAll ( $ sql , $ bind ) ; return $ segments ; }
Returns all stored segments that are available for the given site and login.

@param  string $userLogin
@param  int    $idSite Whether to return stored segments for a specific idSite, or all of them. If supplied, must be a valid site ID.
@return array
Returns all stored segments that are available for the given site and login .