Opened 11 years ago
Closed 11 years ago
#5229 closed defect (bug) (fixed)
Problem with bp_core_mark_user_spam_admin
Reported by: | j.conti | Owned by: | boonebgorges |
---|---|---|---|
Milestone: | 1.9 | Priority: | normal |
Severity: | major | Version: | 1.8.1 |
Component: | Members | Keywords: | |
Cc: |
Description
There is a problem with this function in WordPress Multisite 3.7.1 (I don't now in not multisite, I don't test it)
After a week of looking for a solution for WangGuard cron, I find the problem.
The problem is that bp_core_mark_user_spam_admin don't process all users in bulk action.
Steps: (you don't need WangGuard).
- You need some test user registered and with activity.
- Go to network -> users
- Select a user (only 1 user) and in Bulk action select "Mark as Spam"
- All activity of that user will be removed.
After that:
- Now mark many users and in Bulk action select "Mark as Spam"
- All users will be marked as spam but all activity are not removed.
So, bp_core_mark_user_spam_admin() only can precess 1 user? or is update_user_status with the hook make_spam_user?
http://buddypress.trac.wordpress.org/browser/trunk/bp-members/bp-members-functions.php#L628
http://buddypress.trac.wordpress.org/browser/trunk/bp-members/bp-members-functions.php#L548
Confirmed. When the first user is marked as spam/ham, WP's core functions are unhooked to prevent internal looping. We need to replace them when we're done.