commit 2d157463ed6feea1bc2d22d3c304413d54b4e94a Author: Lee Rowlands Date: Wed Feb 27 16:39:39 2013 +1000 Patch 7 diff --git a/core/modules/comment/comment.module b/core/modules/comment/comment.module index 9ee6f81..b58df64 100644 --- a/core/modules/comment/comment.module +++ b/core/modules/comment/comment.module @@ -1609,6 +1609,15 @@ function comment_preprocess_block(&$variables) { function comment_prepare_author(Comment $comment) { // The account has been pre-loaded by CommentRenderController::buildContent(). $account = $comment->uid->entity; + $anonymous_fields = array('name', 'homepage'); + if ($account->uid == 0) { + // Make sure that correct anonymous fields are set if provided. + foreach ($anonymous_fields as $field) { + if (!empty($comment->{$field}->value)) { + $account->{$field} = $comment->{$field}->value; + } + } + } if (!$account) { $account = entity_create('user', array('uid' => 0, 'name' => $comment->name->value, 'homepage' => $comment->homepage->value)); }