There's a bug in user_activity_type_check() that prevents user activities targeting specific roles (those with some of the type checkboxes checked) from being recorded. The user's roles are store in the keys of $token_objects['account']->roles but the $types passed to hook_activity_type_check() are in the values.

The attached patch modifies user_activity_type_check() to compare the correct values and to return a Boolean value rather than an integer as is specified in the documentation in DEVELOPER.txt.

CommentFileSizeAuthor
activity_user_roles.patch997 bytesdrewish

Comments

sirkitree’s picture

Status: Needs review » Fixed

Thank you, committed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.