Opened 11 years ago
Closed 11 years ago
#25198 closed defect (bug) (duplicate)
Comments never show display name
Reported by: | Saenic | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.6 |
Component: | Comments | Keywords: | |
Focuses: | Cc: |
Description
This bug is easy to reproduce:
- Write a comment while logged in
- Change your display in the Admin panel
- 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)
Note: See
TracTickets for help on using
tickets.
Duplicate of #10653.