Wordpress 1.5 Registered Name displayed wrong

While logged in on my blog and creating a comment it says:
‘Leave a Reply
Logged in as Dan. Logout »’

But after the comment is posted it shows my User login as the author of the comment, instead of my display name which is Dan.

So I easily fixed it by changing the wp-comments-post.php file to look at the right table.

Open wp-comments-post.php:
Change

$comment_author = $user_login;

on line 24 to:

$comment_author = $user_nickname;

Notice it was calling the login table and not the nickname table. I wonder if it should call the niename table instead, no, I didn’t think so.

About the Author, Dan Cameron:

I'm the owner and solution engineer at Sprout Venture, a web solutions company that specializes in web development including WordPress.

I started my first blog in 2003 and transitioned to WordPress in 2004. Since moving to WordPress I've written a few plugins and themes for public consumption. Lately I'm busy engineering/building/coding and have only been able to share a few code snippets.

If you're in need of some web development, web design or custom WordPress plugins and/or themes contact me, I'll be happy to discuss it with you.

Read More »

blog comments powered by Disqus