omab/python-social-auth — pull request #108 by javieraxiacore (2013-11-26 13:24:03+00:00)
Title: allow for custom username field with custom user models in Django

This change is required to support properly the USERNAME_FIELD setting
of the AbstractBaseUser class. See

https://docs.djangoproject.com/en/1.6/topics/auth/customizing/#django.contrib.auth.models.CustomUser.USERNAME_FIELD

Previous code was losing the 'username' field, and overwriting the
USERNAME_FIELD with the 'username' initial value.