You are here

function useractivity_activityapi in Activity 6

Implementation of hook_activityapi().

File

contrib/useractivity/useractivity.module, line 48

Code

function useractivity_activityapi(&$activity, $op) {
  if ($op == 'load' && $activity['data']['module'] == 'useractivity') {
    if ($activity['data']['operation'] == 'insert' || $activity['data']['operation'] == 'update' || $activity['data']['operation'] == 'view') {
      $uid = $activity['data']['operation'] == 'view' ? $activity['data']['target-uid'] : $activity['data']['uid'];
      if (!user_view_access(activity_user_load($activity['data']['target-uid']))) {
        $activity = array();
      }
    }
  }
}