commit b48cce0aca1304deacb75671d16f77d1f45753ef
Author: andrew morton <graveltech@gmail.com>
Date:   Mon Jul 20 15:05:22 2009 -0400

    Fixing a bug where user activity specific to a role would not be recorded because user_activity_type_check() was looking for role ids in the wrong place.

diff --git a/modules/user.activity.inc b/modules/user.activity.inc
index 28fe362..435e761 100644
--- a/modules/user.activity.inc
+++ b/modules/user.activity.inc
@@ -10,5 +10,9 @@
  * Implementation of hook_activity_type_check().
  */
 function user_activity_type_check($token_objects, $types) {
-  return count(array_intersect_key($token_objects['account']->roles, $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);
 }
\ No newline at end of file
