Make WordPress Core

Opened 11 years ago

Closed 11 years ago

#25198 closed defect (bug) (duplicate)

Comments never show display name

Reported by: saenic's profile Saenic Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.6
Component: Comments Keywords:
Focuses: Cc:

Description

This bug is easy to reproduce:

  1. Write a comment while logged in
  2. Change your display in the Admin panel
  3. Write another comment

Your first comment will show your old display name while your 2nd comment will show your new display have.

Technical details:

For not logged in users Wordpress saves the user name directly in $comment->comment_author. But for logged in users Wordpress is supposed to leave the $comment->comment_author field blank and instead fill out $comment->user_id. But it doesn't. When I do a var_dump on the $comment object, there is no user_id field and the comment_author field has my currently set display name in it.

The get_comment_author($comment_id) function checks if $comment->comment_author is empty and then looks for the $comment->user_id.

Change History (1)

#1 @SergeyBiryukov
11 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #10653.

Note: See TracTickets for help on using tickets.