Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get comment author from the comment user_id field #1429

Merged

Conversation

goldenapples
Copy link
Contributor

@goldenapples goldenapples commented Apr 20, 2023

Updates the get_comment_author function to retrieve the comment author ID from the "user_id" field of the comment rather than assuming the current user is the author of the comment.

Fixes #1428.

Describe your approach and how it fixes the issue.

Checklist

  • Project documentation has been updated to reflect the changes in this pull request, if applicable.
  • I have tested the changes in the local development environment (see contributing.md).
  • I have added phpunit tests.

Release Changelog

  • Fix: Updates the get_comment_author function to show the comment author rather than the current user.

Release Checklist

  • This pull request is to the master branch.
  • Release version follows semantic versioning. Does it include breaking changes?
  • Update changelog in readme.txt.
  • Bump version in stream.php.
  • Bump Stable tag in readme.txt.
  • Bump version in classes/class-plugin.php.
  • Draft a release on GitHub.

Change [ ] to [x] to mark the items as done.

Updates the get_comment_author function to retrieve the comment author
ID from the "user_id" field of the comment rather than assuming the
current user is the author of the comment.
Copy link
Contributor

@kasparsd kasparsd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great, thank you!

@kasparsd kasparsd merged commit 5aa2f73 into xwp:develop Sep 13, 2023
@kasparsd kasparsd mentioned this pull request Oct 9, 2023
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Comment author" field is displayed incorrectly for comment moderation actions
2 participants