Hi,
I've developed some activity types. One type required to record activities for some other user. It is something like moderator approves a node and an activity should be added to author's side. When I'm trying by passing 'user' object in the $context, it records the activity for the logged in user (not for the author).

Please help
Thank you

Comments

Scott Reynolds’s picture

Ya this is a pretty serious issue in the end.

The simple way

function some_module_activity_record_alter($record, $context) {
  if ($context['hook'] == 'nodeapi' && $context['op'] == 'update' && isset($context['node'])) {
    $record->uid = $context['node']->uid;
  }
}
_shy’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

D6 reached its EOL back in February 2016, and there is no active release for D6 for this module anymore.
Development or support is not planned for D6. All D6-related issues are marked as outdated in a bunch.

If the issue remains relevant for D10+ versions, merge requests with proposed solutions for a new module version (D10+) are welcome in a new follow-up issue.

Thanks!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.