Due to the nature of array_merge(), when the configuration is set to display the login form first, the username field gets overwritten because of its existence within the comment form. I'm not sure this is the best approach to control where on the form the fields are displayed. Drupal's Form API provides the '#weight' property for this sort of thing.

Attached is my patch that corrects this issue as well as

  1. Fixing #564388: Incorrect User name
  2. Correcting hook_form_alter calls for user_login upon other modules (line 58) by using an empty array instead of NULL. I ran into this issue with XML Sitemap because it expected the second parameter, $form_state, to be an array.
CommentFileSizeAuthor
comment_login.diff1.94 KBpianomansam