﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
21832	allow USERNAME_FIELD to be a ForeignKey	Chris Jerdonek	ANUBHAV JOSHI	"This issue is to add support for `USERNAME_FIELD` being a `ForeignKey`.  Currently, this isn't supported because, for example, the `createsuperuser` command doesn't support inputting the corresponding foreign key data (also see #21755 for another issue with the `createsuperuser` command needed for this).

One use case for `USERNAME_FIELD` being a `ForeignKey` is if the username is an email address, and you would like to have a separate table for e-mail address related data (e.g. total e-mails sent, last e-mail sent, etc), as well as allow changing the email address on a user account.
"	New feature	closed	contrib.auth	dev	Normal	fixed	USERNAME_FIELD,ForeignKey,foreign key,auth,username	Baptiste Mispelon chris.jerdonek@… loic@…	Accepted	1	0	0	0	0	0
