django-registration icon indicating copy to clipboard operation
django-registration copied to clipboard

Undocumented assumption about custom user models

Open kokolem opened this issue 2 years ago • 2 comments

The two-step activation workflow's RegistrationView expects the user object to have a email_user method: https://github.com/ubernostrum/django-registration/blob/7a1d8609b7c262f0321bbb39a6f901b9a6953cce/src/django_registration/backends/activation/views.py#L106 This is true for custom user models that inherit from AbstractUser, but not for those that inherit from AbstractBaseUser. I belive this should be documented in Compatibility of the built-in workflows with custom user models section.

kokolem avatar Jul 30 '23 01:07 kokolem

As noted over in #234, I'm already planning to do a new major version which will focus on the custom-user handling. So I'll look into fixing the documentation for now, but also the main focus is going to be on making the whole thing less brittle.

ubernostrum avatar Aug 01 '23 05:08 ubernostrum