Skip to:

Opened 9 years ago

Closed 9 years ago

#5229 closed defect (bug) (fixed)

Problem with bp_core_mark_user_spam_admin

Reported by: jconti's profile j.conti Owned by: boonebgorges's profile boonebgorges
Milestone: 1.9 Priority: normal
Severity: major Version: 1.8.1
Component: Members Keywords:


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?

Change History (2)

#1 @boonebgorges
9 years ago

  • Milestone changed from Awaiting Review to 1.9

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.

#2 @boonebgorges
9 years ago

  • Owner set to boonebgorges
  • Resolution set to fixed
  • Status changed from new to closed

In 7514:

Replace make_spam_user hooks after processing in bp_core_process_spammer_status()

We initially unhook them to avoid unwanted looping within the function, and we
must replace them so that bulk spamming and hamming work as expected.

Fixes #5229

Note: See TracTickets for help on using tickets.