I have noticed that there are a LOT of instances where Dolphin and developers do not pay attention to the `Profiles`.`allow_view_to` flag in their thus making profiles that want to be hidden from public view visible.
Now, I am in now way a MYSQL guru but.. I have come up with this nifty little snippet that respects the privacy flag anytime you read a profile
$iId = getLoggedId() ;
$sJoinClause = ' LEFT JOIN `sys_friend_list` Friend ON
(`owner_id` = Friend.`Profile` AND Friend.`ID` = "' .
$iId. '" AND Friend.`Check` = "1") LEFT JOIN `sys_friend_list` Profile
ON (`owner_id` = Profile.`ID` AND Profile.`Profile` = "' .
$iId . '" AND Profile.`Check` = "1") ';
$sWhereClause = ' (`owner_id` = "' . $iId. '" OR (Friend.`Profile` AND Friend.`ID` = "' .
$iId . '") OR (Profile.`ID` AND Profile.`Profile` = "' . $iId. '")) OR `Profiles`.`allow_view_to` != '2' ';
This ONLY read profiles that are in your friends list OR the profile is a public profile, thus hiding any member that has their profile set to private.
Like I said, I am NO MYSQL guru, but this works on my end.
If anyone has a much better or cleaner way to handle this, please toss it in here.
:)