[buddypress-trac] [BuddyPress Trac] #5275: WordPress Network Admin Users unspam after BuddyPress user's profile capabilities spam doesn't unspam user

buddypress-trac noreply at wordpress.org
Thu Jan 15 21:28:02 UTC 2015


#5275: WordPress Network Admin Users unspam after BuddyPress user's profile
capabilities spam doesn't unspam user
------------------------------------+--------------------
 Reporter:  imath                   |       Owner:
     Type:  defect (bug)            |      Status:  new
 Priority:  normal                  |   Milestone:  2.2
Component:  Members                 |     Version:  1.8.1
 Severity:  normal                  |  Resolution:
 Keywords:  has-patch dev-feedback  |
------------------------------------+--------------------
Changes (by imath):

 * keywords:  has-patch commit => has-patch dev-feedback


Comment:

 Thanks for your feedback DJPaul, you're absolutely right.

 This is due to the fact, we're actually not cleaning user's cache in
 {{{bp_core_process_spammer_status()}}} once we updated the
 {{{user_status}}} field of the wp_users table.

 I've look at {{{bp_core_process_spammer_status()}}} more deeply and came
 to the conclusion some code were not used anymore : i'm talking about the
 {{{$is_admin}}} check. It's now possible to manage the spam status of the
 user on front end or in administration screens whatever the multisite
 config is.

 Now i think the {{{$do_wp_cleanup}}} part only concerns multisite configs.
 This variable is false only if WordPress already did the cleanup, which
 means it's a multisite config. So if true, if think we only have to do the
 multisite clean up : it's happening when i spam a user from front end or
 from the wp-admin/user extended profile (since 2.0) or from the spam row
 action since (2.1 if i remember well). So i moved the "BuddyPress"
 specific logic (user_status field set to 1) for spamming a user out of
 this part because it needs to happen whatever the config is.

 I've also added {{{clean_user_cache( $user_id );}}} just after the
 user_status field of the wp_users table has been updated so that we make
 sure {{{bp_core_process_spammer_status()}}} is actually cleaning the
 user's cache.

 I've removed the {{{clean_user_cache()}}} from every tests.

 I'd be very thankful if you could take a look at 5275.04.patch the sooner
 you can because i think we should have this fixed for 2.2.

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5275#comment:13>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list