#5113 closed enhancement (fixed)
Non multisite blogs need Account settings component to be active to mark a user as spammer
Reported by: | imath | Owned by: | boonebgorges |
---|---|---|---|
Milestone: | 2.0 | Priority: | normal |
Severity: | normal | Version: | 1.7 |
Component: | Administration | Keywords: | has-patch |
Cc: | mercijavier@… |
Description
Hi,
This is a suggestion to help you think about the fact that if the component Account Settings is not active on a regular blog (non multisite), then the admin has no way to mark a user as spammer.
As this component is not set to active on a fresh install, i think it can be problematic for this kind of blogs.
There's a possibility to make this component active by default, but i think as it can be deactivated by admin, i explored another way.
I may have made things wrong about this, so i apologize if i did.
You'll find a diff that creates a new row actions on the wp-admin/users.php screen to mark or unmark a user as spammer and handles this action.
Attachments (4)
Change History (17)
#1
follow-up:
↓ 2
@
11 years ago
- Component changed from Members to Administration
- Keywords has-patch needs-testing added
- Milestone changed from Awaiting Review to 1.9
- Version changed from 1.8 to 1.7
#2
in reply to:
↑ 1
@
11 years ago
Replying to r-a-y:
I totally agree with this one, imath. Thanks for the patch!
Thanks r-a-y, you're welcome :)
#3
@
11 years ago
- Keywords needs-refresh added; needs-testing removed
- Milestone changed from 1.9 to 2.0
I spent a bit of time working with this patch, and while I think it's good, I am a bit uneasy about it. I don't want to create a disparity between the interface in MS and non-MS. I should say, there is of course *already* a disparity that this ticket is trying to resolve, and I don't want to create another one.
Since the root issue here is that WordPress Multisite has a native interface for spamming users, and BuddyPress introduces the concept of spam users into non-Multisite, I think BP's goal should be to provide the same user experience in non-Multisite as what's available in MS. At a minimum, I think this means that we should be adding bulk actions "Mark as Spam" and "Not Spam" on wp-admin/users.php. And if we're going to add the row-actions links (which I really, really like), we should do it in MS too.
5113.02.diff does some of this work. It cleans up the patch a little, and adds the row-actions in MS. However, it looks like some of the new functionality has the effect of breaking nonce checks when performing the native bulk actions in MS, so more work is needed to figure this out. And I haven't looked at adding bulk actions to non-MS, though this shouldn't be too hard.
Moving to 2.0.
#5
@
11 years ago
- Keywords needs-refresh removed
03.patch
fixes Boone's issue with using multisite's bulk spam action.
It does a check for the $_POST['mode']
parameter and bails if a bulk action is in use.
#6
@
11 years ago
Thanks a million, r-a-y.
I started to add bulk actions, but it turns out that, WP only allows you to *remove* bulk actions, not add them. See https://core.trac.wordpress.org/browser/trunk/src/wp-admin/includes/class-wp-list-table.php?annotate=blame#L284 and https://core.trac.wordpress.org/ticket/16031. This is not worth extending WP_List_Table for.
Let's go with the patch as it currently stands. It doesn't introduce 100% parity between MS and non-MS, but it's pretty close.
#7
@
11 years ago
- Owner set to boonebgorges
- Resolution set to fixed
- Status changed from new to closed
In 8174:
#8
follow-up:
↓ 10
@
11 years ago
I started to add bulk actions, but it turns out that, WP only allows you to *remove* bulk actions, not add them.
Read some posts linked from that ticket suggesting adding bulk actions via javascript as a workaround, but that seems a little hacky.
If we really wanted to achieve parity, we could do that.
#10
in reply to:
↑ 8
@
11 years ago
Replying to r-a-y:
If we really wanted to achieve parity, we could do that.
Or use another trick in PHP.. see the patch bulk_trick.diff
#11
@
11 years ago
Or use another trick in PHP.. see the patch bulk_trick.diff
Nice! That's a neat trick indeed! ;)
We'll also have to reimplement the bulk-action handling when spamming / unspamming a user for single-site.
#12
follow-up:
↓ 13
@
11 years ago
Errr. This is a neat trick, but could cause namespace problems and who knows what else. I'd much rather that we push WP toward fixing the underlying issue. Maybe this can be moved to a separate ticket.
#13
in reply to:
↑ 12
@
11 years ago
Replying to boonebgorges:
Errr. This is a neat trick, but could cause namespace problems and who knows what else. I'd much rather that we push WP toward fixing the underlying issue. Maybe this can be moved to a separate ticket.
I agree, anyway there's something wrong when trying to get the action, i thought it was javascript, but it looks like it's a redirect.. so the action is not available once posted unless the bottom bulk has been used
I totally agree with this one, imath. Thanks for the patch!
Moving to 1.9.