WordPress.org

Making WordPress.org

Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#2493 closed enhancement (fixed)

Forums: Add "flagged by [name]" notice to user profiles

Reported by: SergeyBiryukov Owned by: coffee2code
Milestone: Priority: normal
Component: Support Forums Keywords: has-patch commit has-screenshots
Cc:

Description

The "marked as spam by [name]" notice implemented in #2379 is useful as an indicator that a moderator decided something was spam, so other moderators can focus on auto-detected spam.

@zoonini suggested that a adding a similar "flagged by [name]" to user profiles would be helpful for distinguishing between (probably incorrectly) auto-flagged users and mod-flagged users.

We could probably implement this separately from user notes (#2272). Ideally, moderators should always leave a note when flagging someone, but I suspect that might not always be the case, unless leaving a note would be required.

Attachments (5)

meta-2493.pending-view.PNG (15.7 KB) - added by SergeyBiryukov 2 years ago.
meta-2493.single-topic.PNG (17.1 KB) - added by SergeyBiryukov 2 years ago.
meta-2493.user-profile.PNG (27.1 KB) - added by SergeyBiryukov 2 years ago.
meta-2493.patch (6.0 KB) - added by SergeyBiryukov 2 years ago.
meta-2493.2.patch (6.8 KB) - added by SergeyBiryukov 2 years ago.

Download all attachments as: .zip

Change History (23)

This ticket was mentioned in Slack in #forums by sergey. View the logs.


2 years ago

#2 @zoonini
2 years ago

I was hoping the indicator could be added directly above each topic/reply in Pending view - https://wordpress.org/support/view/pending/ - in the same way "Marked as spam by Username" is also displayed right there.

If adding it to both Pending view and profiles were possible, that would be incredibly useful.

#3 @SergeyBiryukov
2 years ago

  • Keywords has-patch commit added

meta-2493.patch adds the notice to Pending/Spam views, single topic view, and user profile:

Note: The patch will need a refresh if #2474 gets committed first, as they both touch the same code.

Like in #2474, the name of the moderator who unflagged the user is not displayed anywhere at the moment (as there's no notices for non-flagged users), but I thought it would be helpful to keep that data for future reference, just in case.

Last edited 2 years ago by SergeyBiryukov (previous) (diff)

#4 @zoonini
2 years ago

The screenshots look great!

#5 @SergeyBiryukov
2 years ago

  • Keywords has-screenshots added

#6 @SergeyBiryukov
2 years ago

Refreshed after [4987] and [4988].

Would appreciate a review from someone who can commit to wporg-bbp-user-moderation plugin :)

#7 @coffee2code
2 years ago

In 5002:

Support Forums, User Moderation: Record user_nicename of moderator who flags/unflags a user.

Props SergeyBiryukov.
See #2493.

#8 @coffee2code
2 years ago

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

In 5003:

Support Theme: For user profiles, spam/pending views, and single topic views, indicate moderator who flagged a user.

Props SergeyBiryukov.
Fixes #2493.

#9 @coffee2code
2 years ago

In 5004:

Support Theme: Show notice indicating a flagged user even if the moderator who flagged them isn't known.

See #2493.

#10 @coffee2code
2 years ago

In 5005:

Support Theme: Ensure only moderators can see the notice for flagged users on user profiles.

See #2493.

#11 follow-up: @ocean90
2 years ago

Is there a reason why you're storing user_nicename/user_login instead of the ID? Note that r4987 is using user_login while r5002 uses user_nicename.

Last edited 2 years ago by ocean90 (previous) (diff)

#12 @coffee2code
2 years ago

In 5006:

Support Theme: Get name of user meta key used to store moderator who flagged a user directly from the managing plugin.

See #2493.

#13 in reply to: ↑ 11 @SergeyBiryukov
2 years ago

Replying to ocean90:

Is there a reason why you're storing user_nicename/user_login instead of the ID? Note that r4987 is using user_login while r5002 uses user_nicename.

This was modeled after [4847], based on _bbp_akismet_user, which stores user_login. That seemed enough as an informational note for moderators, who generally know each other and don't need full display name. Storing the ID would require getting the user object, which seemed unnecessary.

After a chat with @coffee2code, we're going to switch to user_nicename going forward, as it can be used directly in a URL, and still can be used to get the user object if needed.

#14 @coffee2code
2 years ago

In 5007:

Support Theme: In flagged user notices, link the moderator name to their profile.

See #2493.

#15 @SergeyBiryukov
2 years ago

In 5013:

Support Theme: Change "This user has been flagged" notice class from info to warning.

See #2493.

#16 @SergeyBiryukov
2 years ago

In 5051:

Support Theme: After [5007], change moderators' WP.org profile links to forum profiles, for consistency with other profile links across the forums.

See #2493.

#17 @SergeyBiryukov
2 years ago

In 5111:

Support Forums: In Moderators::archive_post() and ::unarchive_post(), store user_nicename instead of user_login, for consistency with [5002].

See #2474, #2493.

#18 @SergeyBiryukov
2 years ago

In 5292:

Support Forums: In Moderators::store_moderator_username(), store user_nicename instead of user_login, for consistency with [5002] and [5111].

See #2474, #2493.

Note: See TracTickets for help on using tickets.