Profile set to "Me Only" but is still searchable

I am working on private profiles now.

When I do a profile search, I still see several profiles that are marked in the Profiles database as 2.

This should not happen.

Does anybody have any suggestions?

in BxBaseSearchProfile.php  I changed the code to this

class BxBaseSearchProfile extends BxBaseSearchResultText {
    var $aCurrent = array(
        'name'             => 'profile',
        'title'            => '_People',
        'table'            => 'Profiles',
        'ownFields'        => array('ID', 'NickName', 'NickName', 'Headline', 'DescriptionMe', 'Country', 'City', 'Tags', 'DateReg', 'DateOfBirth', 'Sex', 'Couple','allow_view_to'),
        'searchFields'     => array('NickName', 'Headline', 'DescriptionMe', 'City', 'Tags'),
        'restriction'      => array(
        'activeStatus'     => array('value'=>'Active', 'field'=>'Status', 'operator'=>'='),
        'AllowViewTo'      => array('value'=>'2', 'field'=>'allow_view_to', 'operator'=>'<>'),
        ),
        'paginate' => array('perPage' => 10, 'page' => 1, 'totalNum' => 10, 'totalPages' => 1),
        'sorting'  => 'last'
    );

But that doesn't seem to have any effect.

Thanks!

http://www.mytikibar.com
Quote · 17 May 2014

Could it be the operator?

     
$a != $b Not equal TRUE if $a is not equal to $b after type juggling.
$a <> $b Not equal TRUE if $a is not equal to $b after type juggling.
$a !== $b Not identical TRUE if $a is not equal to $b, or they are not of the same type.
Geeks, making the world a better place
Quote · 17 May 2014

check BxBaseSearchResult.php for calls to clearFilters() 

line 310 and 384.

I was just looking around, didn't bothered to test anything.

so much to do....
Quote · 17 May 2014

This is also just a hunch.

'operator'=>'<>'

The php code may be having problems dealing with <> as a operator. I would try != as a operator instead.

https://www.deanbassett.com
Quote · 17 May 2014

ok I changed the operator to !=  and I still have the same issue.  I suspect there's some more code buried deep that need to be fixed.

http://www.mytikibar.com
Quote · 17 May 2014

 

ok I changed the operator to !=  and I still have the same issue.  I suspect there's some more code buried deep that need to be fixed.

 check BxBaseSearchResult.php for calls to clearFilters() 
line 310 and 384.
I was just looking around, didn't bothered to test anything.

?

so much to do....
Quote · 17 May 2014

I found it!

BxBaseSearchProfile

 

        $sQuery = 'SELECT DISTINCT SQL_CALC_FOUND_ROWS IF( `Profiles`.`Couple`=0, `Profiles`.`ID`, IF( `Profiles`.`Couple`>`Profiles`.`ID`, `Profiles`.`ID`, `Profiles`.`Couple` ) ) AS `ID` ' . $sIsOnlineSQL . ' FROM `Profiles` ';
        $sQueryCnt = 'SELECT COUNT(DISTINCT IF( `Profiles`.`Couple`=0, `Profiles`.`ID`, IF( `Profiles`.`Couple`>`Profiles`.`ID`, `Profiles`.`ID`, `Profiles`.`Couple` ) )) AS "Cnt" FROM `Profiles` ';

        list ($aWhere, $sJoin, $sPossibleOrder) = $this->GenSqlConditions($aSearchBlocks, $aRequestParams, $aFilterSortSettings);

        $sWhere = ' WHERE ' . implode( ' AND ', $aWhere );
###       
#SteveSoft
#01-29-2014
#
        $iBlockedId    = getLoggedId();
        $sBlockedCheck = " AND NOT (SELECT COUNT(*) FROM `sys_block_list` WHERE `Profiles`.`ID` = `sys_block_list`.`ID` AND `sys_block_list`.`Profile` = '{$iBlockedId}') ";
###       
#SteveSoft
#05-17-2014
#
if ((!isAdmin()) && (!isModerator()))
    $sProfilePrivate = " AND `Profiles`.`allow_view_to` != '2' ";
   

        //collect the whole query string
        $sQuery = $sQuery . $sJoin . $sWhere . $sBlockedCheck . $sProfilePrivate.$sPossibleOrder;
        $sQueryCnt = $sQueryCnt . $sJoin . $sWhere . $sPossibleOrder;

I should have known as I had to add the blocked code in there when someone blocks your profile.  LOL

http://www.mytikibar.com
Quote · 17 May 2014
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.