WP Assign Author to User
A WordPress plugin that links anonymous comments to registered users based on matching email addresses.
by Dataforge · github.com/dataforge/wp-assign-author-to-user · website
Install
The author publishes release zips, so WP-CLI can install straight from GitHub:
wp plugin install https://github.com/dataforge/wp-assign-author-to-user/releases/download/v1.2.3/wp-assign-author-to-user-1.2.3.zipDeclares an update source (https://github.com/dataforge/wp-assign-author-to-user), so updates arrive through the plugin's own updater.
Readme
WP Assign Author to User
A WordPress plugin that links anonymous comments to registered users based on matching email addresses.
Description
When visitors leave comments on your WordPress site without being logged in, those comments are stored with user_id = 0 even if the email address matches a registered user. This plugin helps you identify and link those anonymous comments to their corresponding user accounts.
Features
- Detect Unlinked Comments: Identifies comments where the email matches a registered user but
user_id = 0 - Detect Orphaned Comments: Finds comments pointing to deleted users (
user_idpoints to non-existent user) - Bulk or Individual Linking: Link comments individually or by email address
- Create New Users: Option to create a new user account when linking comments with no existing match
- Email-based Grouping: Groups comments by email address with comment counts
- Safe Updates: Only updates comments that are not spam or trash
Installation
- Download the plugin
- Upload to
/wp-content/plugins/wp-assign-author-to-user/ - Activate through the 'Plugins' menu in WordPress
- Navigate to Comments → Assign Author to User in the WordPress admin
Usage
Link Comments to Existing User
- Go to Comments → Assign Author to User
- Find the email address you want to link
- Click Link to existing user
- Select the user from the dropdown
- Click Link Comments
Create New User and Link Comments
- Go to Comments → Assign Author to User
- Find the email address you want to link
- Click Create new user
- Fill in the username and name
- Click Create User and Link Comments
Filter View
- Show All: Display all email addresses with comments
- Show Unlinked Only: Display only emails with unlinked or orphaned comments
What Gets Updated
When you link comments to a user, the plugin:
- Updates
user_idinwp_commentstable - Only affects comments with
comment_approved NOT IN ('spam','trash') - Skips comments already correctly linked to the target user
- Fixes orphaned comments (pointing to deleted users)
Requirements
- WordPress 5.0 or higher
- PHP 7.0 or higher
Changelog
1.0.0
- Initial release
- Link anonymous comments to users by email
- Create new users and link comments
- Detect and fix orphaned comments
License
This plugin is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation.
Read the full README on GitHub →