original_string: 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;
      }
code: 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;
      }
code_tokens: 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 ; }
docstring: 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
docstring_tokens: Returns all stored segments that are available for the given site and login .