In the antispam.module there is an assignation of the comment author's name with the string 'Anonymous'. I dont know if this is voluntary but this override any submitted name.

See 7-x-1.1 code of antispam.module at line 971:

/**
* Implements hook_comment_load().
*/
function antispam_comment_load($comments) {
  // add signature and spaminess to the $comments object

  foreach ($comments as $comment) {
    $rec = db_query("SELECT signature, spaminess FROM {antispam_spam_marks} WHERE content_type='comment' AND content_id=:content_id", array(':content_id' => $comment->cid))->fetchObject();
    if ($rec) {
      $comment->signature = $rec->signature;
      $comment->spaminess = $rec->spaminess;
    }
    else {
      $comment->signature = '';
      $comment->spaminess = 0.0;
    }
    if ($comment->uid == 0) {
      $comment->name = variable_get('anonymous', t('Anonymous'));
    }
  }
}

Comments

versvs’s picture

This really made my day!! I've been crawling through this error for a time and commenting these lines really made it disappear.

I'd recommend submitting it to master so that this error doesn't get back like a hunting ghost when a new version is released :)

Thank you!

markpeak’s picture

Confirm this problem. It should display username field with 'non-verified' instead.

emilymoi’s picture

I don't see why antispam needs to blow away the name property at all. Can't we just remove this completely:

if ($comment->uid == 0) {
      $comment->name = variable_get('anonymous', t('Anonymous'));
}
alphageekboy’s picture

Version: 7.x-1.1 » 7.x-1.x-dev
Status: Active » Needs review
StatusFileSize
new374 bytes

Here is a simple patch that removes the override of anonymous for comments. We have a site that uses the name field where visitors do not need to be authenticated to make comments and we need to retain the username.

NitroPye’s picture

Having a similar issue not sure if it is the same issue.

In the admin panel for spam no matter what the user "Anonymous (Not verified)" is applied. If I got to the comment it is an actual user. I applied the fix above but that did not work for me.

It would also be nice if the Author column was a link to the author but that is not part of this bug.

Anonymous’s picture

Also having this problem, guest comments are all displayed as "Anonymous". Have you considered incorporating one of the patches provided above?

stevenx’s picture

works.

kmonty’s picture

Status: Needs review » Reviewed & tested by the community

R+T patch in comment #4

As far as I can tell, there is no need for this module to update the commenter name. The antispam_spam_marks table doesn't store any name data, so there is nothing to update in the first place. The comment.module already handles this.

kmonty’s picture

tim.plunkett’s picture

Priority: Critical » Normal
StatusFileSize
new3.54 KB
new3.18 KB

Here's an automated test for the fix.

jody lynn’s picture

Committed to 7.x-1.x.

Thanks!

The era of antispam testing has begun.

jody lynn’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.