Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#21735 closed Bug (duplicate)

username field uniqueness check should be optional

Reported by: Chris Jerdonek Owned by: nobody
Component: Core (Management commands) Version: 1.6
Severity: Normal Keywords:
Cc: chris.jerdonek@… Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Currently, Django doesn't let you have a username field with unique=False. This limitation was imposed recently in issue #19822.

I think this limitation should be lifted.

In my use case, email address is the username field, and I would like a user account to be considered active only after the signup has been validated via email. To handle this use case, it is natural to add the account info to the user table when someone tries to sign up, and then activate that row only when the user clicks the corresponding validation link. This is essentially what django-registration does in its two-phase registration workflow, with minor variations.

However, with this use case, there are edge cases where the same email address can exist unregistered in the database more than once. Instead, with this process the unique index should be on a pair of columns to enforce the fact that each email address should be in the database only once -- when restricted to active user accounts.

Change History (3)

comment:1 by Chris Jerdonek, 11 years ago

Cc: chris.jerdonek@… added

comment:2 by Chris Jerdonek, 11 years ago

I discovered that this is a duplicate of issue #19844. However, it looks like I don't have permission to close my own issue.

Version 0, edited 11 years ago by Chris Jerdonek (next)

comment:3 by Chris Jerdonek, 11 years ago

Resolution: duplicate
Status: newclosed
Note: See TracTickets for help on using tickets.
Back to Top