WordPress.org

Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#19710 closed enhancement (duplicate)

Deleting a user does not update Comments.

Reported by: thee17 Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.3
Component: Comments Keywords:
Focuses: Cc:

Description

Part 1: the Bug-

When you delete a user and reassign the content to another user the USER_ID does not get updated in wp_comments table.

Solution A) Replace all with 0 for none -or- Solution 2) Replace with the ID of the new replace.

Part 2: The Enhancement-

If the Name, email address, or URL in the linked user profile changes that Comments should be updated.

Change History (5)

#1 @scribu
10 years ago

  • Keywords needs-patch removed
  • Milestone Awaiting Review deleted
  • Type changed from defect (bug) to enhancement

Part 1:

The user id is usually not used at all when displaying the comments.

Part 2:

This is highly debatable. For example, on DeviantArt (a very popular art site), each user can actually choose if they want their information to be updated or to remain as it was when they first entered the comment.

Both parts:

Also note that keeping this information up to date can be quite expensive in a multisite context. For example, on wordpress.com, a user can leave comments on any of the millions of blogs. So, the software would have to run a query on each and every wp_comments table.

The best course of action is to implement both of these as a plugin. For multisite, you could store the blog ids where the user has left comments and only update those.

#2 @thee17
10 years ago

Then perhaps since it is so taxing in a Network environment then perhaps user_id should be removed/depreciated. I was only using it to store twitter ID's from pre comments meta era.

#3 @scribu
10 years ago

It does have other uses, but yeah, the user id could be stored as a comment custom field now. However, migrating it over just isn't worth the trouble at this point.

#5 @thee17
10 years ago

  • Resolution set to duplicate
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.