#21839: User Model username field
------------------------------+-------------------------------
     Reporter:  davegunnoe@…  |      Owner:  nobody
         Type:  New feature   |     Status:  new
    Component:  contrib.auth  |    Version:  1.6
     Severity:  Normal        |   Keywords:  custom-user-model
 Triage Stage:  Unreviewed    |  Has patch:  0
Easy pickings:  0             |      UI/UX:  0
------------------------------+-------------------------------
 I would love to see django officially use an email address as the
 username. It seems like a much more logical choice and would put an end to
 the constant questions appearing all over the internet regarding best
 practices when defining a custom user model as well as all the problems
 people have with it.

 My recommendation:
  - Modify the default user model to allow users to authenticate using
 either their username or email address. This is becoming common behavior
 on many popular web applications.
  - Make both the username and email fields optional so users aren't
 required to created a username.

 The benefits of this would be huge for django because it would create out-
 of-the-box functionality that developers actually want out of the box. As
 it stands now, the majority of django projects created have to immediately
 modify this core piece of functionality and the modification trickles
 through the rest of their code. It would also make more sense because
 email addresses are, by definition, unique and could serve as the unique
 identifier.

 At the very least, maybe just don't define a user model and leave the
 abstract class in place. This would at the very least not hijack the most
 sensible name for the user model, "User".

 I know this would likely result in some backwards incompatibility issues
 regarding the current method of defining a custom user model but there
 could be a setting made to effectively make it an opt-in feature.

 I'm sure this has been said before. But it just seems like the community
 is screaming loudly and clearly that this is an area which needs work.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/21839>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.a5de83617e4d5ec1b4c8af9b7e840542%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to