#263 closed defect (bug) (fixed)
Friend requests are still left after deletion of user.
Reported by: | Jehy | Owned by: | |
---|---|---|---|
Milestone: | Priority: | critical | |
Severity: | Version: | ||
Component: | Keywords: | ||
Cc: |
Description
I have deleted a user, but still see a buggy friend request - from someone nameless.
We need to clear it up, don't we?
Change History (5)
#3
@
16 years ago
UPD:
Sorry, a bit uncorrect. Here's the right query:
select wp_bp_friends.id from wp_bp_friends left join wp_users on (wp_users.ID=wp_bp_friends.friend_user_id) WHERE ISNULL(wp_users.id) UNION select wp_bp_friends.id from wp_bp_friends left join wp_users on (wp_users.ID=wp_bp_friends.initiator_user_id) WHERE ISNULL(wp_users.id)
#4
@
16 years ago
- Resolution set to fixed
- Status changed from new to closed
This is cleaned up with a wpmu_delete_user action call. The function delete_all_for_user() is called which will delete any requests and friendships for the user being deleted.
Notifications were not being deleted however - so I've modified the function to delete request notifications and new friendship notifications involving the deleted user for any member.
Note: See
TracTickets for help on using
tickets.
Also there is a bug entry left and being displayed to everybody if there are deleted users in friends.
There's an action , smth like "wp_on_delete_user", there we should remove these invalid links.
For now, you can use sql query
and delete the results - it will remove invalid users from friends.