Add UniqueField Constraint to Display Name

Created on 6 February 2023, about 2 years ago

Problem/Motivation

The Display Name should be ( at least in most cases) unique to avoid confusion and have proper user attribution for content.

Steps to reproduce

Proposed resolution

Add Drupals' UniqueField Constraint to the Display Name field.

Remaining tasks

Probably we want this to be configurable. If so we need to add an option to turn on/off UniqueField constraint.

User interface changes

API changes

Data model changes

✨ Feature request
Status

Needs review

Version

1.1

Component

Code

Created by

πŸ‡¦πŸ‡ΉAustria hatsch

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @hatsch
  • πŸ‡§πŸ‡ͺBelgium p-neyens

    Don't translate the message when adding the constraint. This will be done in the validate method of UniqueFieldValueValidator

  • Status changed to RTBC 10 months ago
  • πŸ‡ΈπŸ‡°Slovakia coaston

    Thank you. #3 works fine.

  • Status changed to Needs work about 1 month ago
  • πŸ‡―πŸ‡΅Japan orakili

    Thank you but this defeats the purpose of this module which is to provide an unconstrained field for the displayed user name. If uniqueness is needed then there is already the default user name field.

    If this is made optional, then I'll reconsider it.

  • πŸ‡¦πŸ‡ΉAustria hatsch

    Hi Orakili,
    thanks for the new D11 compatible release!

    as for this issue, i understand that this is against the purpose of this module.
    but there is an additional use case for having user display name different from username, which is not exposing login name for other users.
    i agree having this optional would be a good idea!

  • πŸ‡ͺπŸ‡ΈSpain psf_ Huelva

    I agree with #6, +1 to this issue.

Production build 0.71.5 2024