'Name' value for anonymous comments can conflict with registered usernames

Created on 25 May 2009, about 15 years ago
Updated 26 March 2024, 3 months ago

Problem/Motivation

If the 'Name' provided for a comment matches a registered user account, the comment can't be saved. This applies to posting new comments or admins editing existing comments.

Steps to reproduce

  1. Install Drupal
  2. Create an article with comments open
  3. As an anonymous user, post a comment with an empty value for 'Name'
  4. As admin, create a user account with username 'Anonymous'
  5. As admin, edit the previous comment posted by anonymous user and see you get a validation error
  6. As anonymous user, confirm you can still post comments with empty value for 'Name' and they are created as 'Anonymous'
  7. As anonymous user, try to post a comment with 'Anonymous' as 'Name' and see you get a validation error

(Note the same occurs with any Name/username, not just Anonymous)

Proposed resolution

Perhaps do this validation for anonymous comments, since 'Name' is just a plain text field? It shows (not verified) for anon users next to the name provided. And comments by the registered user link to the user profile by default. So there is a way to distinguish them:

Remaining tasks

  1. Agree on a resolution
  2. Write a patch with tests
  3. Review

User interface changes

API changes

Data model changes

Release notes snippet

Original issue summary

Hi,
I am trying to get 2.3 to work, but I am stuck on "The name belongs to a registered user.".
I set "access secured pages" permission for securesite also to anonymous users.
How to get this message away and securesite working?
I got a blank field for guest user, and am not able to type something in it, but it has a red border around it.

Thanks for going into this.
Greetings, Martijn

πŸ› Bug report
Status

Closed: works as designed

Version

11.0 πŸ”₯

Component
CommentΒ  β†’

Last updated 2 days ago

Created by

πŸ‡³πŸ‡±Netherlands Summit

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡¦πŸ‡ΊAustralia pameeela

    Since there haven't been any updates to this in 3 years, I'm marking it as closed per the most recent discussion. The other issue is now re-opened and some progress has been made.

Production build 0.69.0 2024