[wp-trac] [WordPress Trac] #25198: Comments never show display name

WordPress Trac noreply at wordpress.org
Fri Aug 30 20:52:59 UTC 2013


#25198: Comments never show display name
--------------------------+-----------------------------
 Reporter:  Saenic        |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Comments      |    Version:  3.6
 Severity:  normal        |   Keywords:
--------------------------+-----------------------------
 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`.

--
Ticket URL: <http://core.trac.wordpress.org/ticket/25198>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list