How to Disable "Joined Member" on the news feed

Disable the "MyName joined the MySite"  on newsfeed :
Go to app/Plugin/SocialIntegration/Controller/AuthsController.php
Find and remove this code
// insert into activity feed
            $this->loadModel('Activity');
            $this->Activity->save(array('type' => APP_USER,
                'action' => 'user_create',
                'user_id' => $this->User->id
            ));
 
Go to app/Lib/MooListener.php
Find and remove this code
// insert into activity feed
$controller->loadModel( 'Activity' );
$controller->Activity->save( array( 'type' => APP_USER,
 'action'  => 'user_create',
 'user_id' => $controller->User->id
) );
Disabled someone joined a group?
 
Go to app/Plugin/Group/Controller/GroupsController.php
Find and remove this code
 
$data = array('type' => 'Group_Group',
                'action' => 'group_join',
                'user_id' => $uid,
                'item_type' => 'Group_Group',
                'items' => $group['id'],
                'target_id' => $group['id'],
                'plugin' => 'Group',
                'privacy' => $group['type']
            );
            $this->Activity->save($data);
Done!
Posted in How To on 02/18/16 at 03:40

Comments (17)

  • Eddie
  • Eddie
  • KakaLot
  • Eddie
  • KakaLot
  • Michel
  • Frank Acosta
  • julz
  • Mark
  • Layla
  • Ryan Nguyen
  • Layla
No login