mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-04 17:20:07 +00:00
Handle blank display_name for commenters. props mrmist. fixes #7494
git-svn-id: https://develop.svn.wordpress.org/trunk@9781 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -40,6 +40,8 @@ $comment_content = ( isset($_POST['comment']) ) ? trim($_POST['comment']) :
|
||||
// If the user is logged in
|
||||
$user = wp_get_current_user();
|
||||
if ( $user->ID ) {
|
||||
if ( empty( $user->display_name ) )
|
||||
$user->display_name=$user->user_login;
|
||||
$comment_author = $wpdb->escape($user->display_name);
|
||||
$comment_author_email = $wpdb->escape($user->user_email);
|
||||
$comment_author_url = $wpdb->escape($user->user_url);
|
||||
|
||||
Reference in New Issue
Block a user