Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The user name displayed in the admin/comment report comes from the comments table. However, a registered user could have changed his name.
This could be fixed by using the following line in the loop that builds the table rows:
$comment->name = $comment->uid ? $comment->registered_name : $comment->name;
This trick is used in many other places of the comments module.
...is that report correct showing a user name that is no longer valid? Imagine joe (uid 10) is renamed to john, and then peter (uid 11) renamed to joe. That report will show comments made by joe, where some are made by uid 10 and some made by uid 11.
Is this diagnostic correct?
Comment | File | Size | Author |
---|---|---|---|
#1 | comment.module.name_in_list.patch | 726 bytes | markus_petrux |
Comments
Comment #1
markus_petrux CreditAttribution: markus_petrux commentedThis patch will show the current user name, which is the same behaviour applied in other places of the module.
Comment #2
moshe weitzman CreditAttribution: moshe weitzman commentedComment #3
killes@www.drop.org CreditAttribution: killes@www.drop.org commentedapplied.
Comment #4
(not verified) CreditAttribution: commented