Currently the email field is forced in the User model. IN addition functions like provision_tenant and create_public_tenant assume that User model has this specific field. So of course, even if I override the User model entirely, I won't be able to use these, unless I override them too.
In my project it is required that Users log in by username and not by email, as due to the nature of the project multiple users have the same emails.
Therefore I would like to suggest allowing developers to configure an alternative to the email field. As for an example, I would configure my User model to have a username instead of email and the add a setting like "TENANT_USERS_USER_IDENTIFIER_FIELD".
Currently the email field is forced in the User model. IN addition functions like provision_tenant and create_public_tenant assume that User model has this specific field. So of course, even if I override the User model entirely, I won't be able to use these, unless I override them too.
In my project it is required that Users log in by username and not by email, as due to the nature of the project multiple users have the same emails.
Therefore I would like to suggest allowing developers to configure an alternative to the email field. As for an example, I would configure my User model to have a username instead of email and the add a setting like "TENANT_USERS_USER_IDENTIFIER_FIELD".