If a user is deleted, their activity stays in the system (which may be desired) but the tokens no longer function correctly.

One gets activity feed information like this:

24.07.2008 - 14:13	 [author] has requested to be friends with bmcmurray

and:

12.08.2008 - 16:33	 [author] has requested to be friends with Anonymous

I haven't had time to yet, but I think that probably the best solution will be to add a hook_user($op = delete) to the module to remove any activity relating to the user being removed. Unless someone else has a better idea at how to cache a deleted user's name to swap it into old activities?

I will post a patch when I get a chance to write the hook.

Comments

jaydub’s picture

Assigned: Unassigned » jaydub
jaydub’s picture

I think we can leverage the activity_targets table for this and try to remove
records for now deleted or inactive users.

jaydub’s picture

a user ID column is going to be added back in the future which will make removing activity from deleted users trivial via hook_user.

jaydub’s picture

Version: 5.x-3.0-beta2 » 5.x-4.x-dev

The new -dev snapshots for the 5.4 branch now have the user id (uid) column added back in to the activity table. This allows for the removal of activity records when a user is deleted via hook_user.

jaydub’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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