Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Since I have updated to token-6.x-1.18 all anonymous comments appear with "Anonymous" user in spite of users writing a value in the comment form .
It seems that this value is being changed on token_user.inc where it does:
if (!$account->uid && empty($account->name)) {
$account->name = variable_get('anonymous', 'Anonymous');
}
Commenting out that assignation the comment author is correctly filled.
Comment | File | Size | Author |
---|---|---|---|
#1 | 1344766-1.patch | 800 bytes | gorbeia |
Comments
Comment #1
gorbeia CreditAttribution: gorbeia commentedThis patch makes token_user.inc not to override $account->name.
Comment #2
Dave ReidAh thanks this definitely needs to be fixed.
Comment #3
gorbeia CreditAttribution: gorbeia commentedComment #4
Dave ReidThanks, committed this to 6.x-1.x-dev: http://drupalcode.org/project/token.git/commit/8b88af7