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

buddypress-trac noreply at wordpress.org
Wed Dec 4 16:03:22 UTC 2013


#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:  Awaiting Review
Component:  Members       |    Version:  1.8.1
 Severity:  normal        |   Keywords:  has-patch
--------------------------+-----------------------------
 while testing #5114 patch, i've noticed that in a Multisite config if i
 mark a user as spammer from the front end
 (site.url/members/user/settings/capabilities/) and i unspam the user from
 the WordPress Network Administration screen for users using the bulk
 action then the user seems to be unspammed from this screen.
 But logging in with the user is forbidden as he's still consider as a
 spammer. The SuperAdmin needs to go to user's profile on front end
 (site.url/members/user/settings/capabilities/) to unmark user as a spammer
 to finally let him log in.
 * When marking a user as spammer
    - from Front end : $wpdb->users fields 'user_status' and 'spam' are set
 to 1
    - from WordPress Network Admin users list : only the field 'spam' is
 set to 1 in $wpdb->users
 * When unmarking a user as spammer
    - from Front end : $wpdb->users fields 'user_status' and 'spam' are set
 to 0
    - from WordPress Network Admin users list : only the field 'spam' is
 set to 0 in $wpdb->users

 At the beginning, I thought as WordPress doesn't seem to use this field at
 all, in a Multisite config we shouldn't update at all this user_status
 field, but i realized that doing so could cause other bugs, as there must
 be a lot of spammed users with a user_status field set to 1 and a spam
 field set to 1 in the different Multisite configs using BuddyPress, and in
 a case of a Multisite to single switch, spammed users might become
 unspammed..

 So i think the best solution in {{{bp_core_process_spammer_status()}}} is
 to run the user_status update query not only if {{{!is_admin}}} but
 always. This way the behavior will be the same in the two contexts. See
 attached diff.

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


More information about the buddypress-trac mailing list