You are here

function user_activity_type_check in Activity 6.2

Implementation of hook_activity_type_check().

File

modules/user.activity.inc, line 11
Activity definition file for user.module

Code

function user_activity_type_check($token_objects, $types) {

  // $types has the role id as values and $token_objects['account']->roles has
  // the role id as keys. Need to get them to match up before checking for
  // intersection.
  $intersection = array_intersect(array_keys($token_objects['account']->roles), $types);
  return !empty($intersection);
}