[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
Wed Dec 3 19:43:23 UTC 2014
#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 |
--------------------------+--------------------
Changes (by imath):
* keywords: needs-patch needs-refresh => has-patch
Comment:
Replying to [comment:7 r-a-y]:
> imath's patch needs to be reviewed a bit based on the WPMU
`'wp_signups'` abstraction
Thanks r-a-y for reminding me this. Actually, the only problem i can see
in this area would be that an admin could display the signup account in
front end using site.url/members/signup_account for instance. And then go
to the settings screen and spam the user. In this case it might be
problematic as the status would no more be '2' but '1'. So to prevent this
case, i think we should check the user_status before setting the displayed
user_id.
That's what i first did in 5275.02.patch.
Then, i've added unit tests and could check that if we only run
{{{$wpdb->update( $wpdb->users, array( 'user_status' => $is_spam ), array(
'ID' => $user_id ) );}}} on single site, then unspaming the user from a
bulk action of the network admin will fail. So i think the fix is to move
this update query to be sure it will be played no matter the config as i
did in 5275.02.patch.
This patch will contain the fix + unit tests. I'm also adding
5275.solotests.patch if you want to check that there's an issue in the
test {{{test_bp_core_process_spammer_status_ms_bulk_ham()}}} on multisite
configs without applying 5275.02.patch.
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5275#comment:9>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list