We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

Check privacy help required! | Forum

Marcus
Marcus Jun 20 '19

Hi trying to do this but it doesn't work:


$eventParams = array(
                    'action' => 'friends_only',
                    'ownerId' => $data['action']['userId'],
                    'viewerId' => OW::getUser()->getId()
                );

              
                   $permissions = OW::getEventManager()->getInstance()->call('privacy_check_permission', $eventParams);
                  
                   print_r($permissions);


I'm trying to hide newsfeed comment field on all users except friends. In other words only friends can comment. 


I can achieve this simply checking dB friends table but this will generate tons of queries imagine a query for each newsfeed post. 


I assume privacy check uses cache. 

The Forum post is edited by Marcus Jun 20 '19
Oxwall Germany Club
Oxwall Germany Jun 20 '19
Topic was moved from General Questions.