omab/django-social-auth — pull request #549 by gfronza (2012-12-18 17:17:34+00:00)
Title: Deal with IntegrityError when signing up a django 1.5 custom model user

Django 1.5 allow us to create custom user models. In my case, my user model specify the email field as unique. When I try to sign up with a social account (e.g. Google account) and the e-mail assigned to this account is already in use by another user of my site, an exception was raised (IntegrityError). With this patch, developers can define a URL to be redirected to when an IntegrityError is raised.