Skip to content
Browse files
  • Loading branch information
brosner committed Sep 9, 2016
1 parent 384476a commit 9c3f71c9145984bb0a75e693c853afbe9a169287
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 44 deletions.
@@ -7,6 +7,7 @@ version with these. Your code will need to be updated to continue working.

* BI: account deletion callbacks moved to hooksets
* BI: dropped Django 1.7 support
* BI: removed deprecated `ACCOUNT_USE_AUTH_AUTHENTICATE` setting with behavior matching its `True` value
* added Turkish translations
* fixed migration with language codes to dynamically set

@@ -55,7 +55,6 @@ class AccountAppConf(AppConf):
HOOKSET = "account.hooks.AccountDefaultHookSet"

def configure_hookset(self, value):
return load_path_attr(value)()
@@ -282,16 +282,7 @@ def after_signup(self, form):
signals.user_signed_up.send(sender=SignupForm, user=self.created_user, form=form)

def login_user(self):
user = self.created_user
# call auth.authenticate to ensure we set the correct backend for
# future look ups using auth.get_user().
user = auth.authenticate(**self.user_credentials())
# set auth backend to ModelBackend, but this may not be used by
# everyone. this code path is deprecated and will be removed in
# favor of using auth.authenticate above.
user.backend = "django.contrib.auth.backends.ModelBackend"
user = auth.authenticate(**self.user_credentials())
auth.login(self.request, user)

@@ -37,31 +37,3 @@ because you can choose not to do any email address storage.
If you don't use a custom user model then make sure you take extra precaution.
When editing email addresses either in the shell or admin make sure you update
in both places. Only the primary email address is stored on the ``User`` model.

Why does auto-login after sign up not log my user in?

If you are using Django 1.6+ and ``django.contrib.auth.backends.ModelBackend``
does not exist in your ``AUTHENTICATION_BACKENDS`` then you will experience an
issue where users are not logged in after sign up (when

This has been fixed, but the default behavior is buggy (for this use case) to
maintain backward compatibility. In a future version of django-user-accounts
the default behavior will not be buggy.

To fix, simply set::


in your Django settings. This will cause the ``login_user`` method of
``SignupView`` to use proper backend authentication to determine the correct
authentication backend for the user. You will need to make sure that
``SignupView.identifier_field`` is set to represent the correct field on the
sign up form to use as the username for credentials. By default the ``username``
field is used (to be consistent with the default username authentication used
for log in.)

If you have a custom need for user credentials passed to the authentication
backends, you may override the behavior using the hookset
@@ -148,8 +148,3 @@ Default: ``list(zip(pytz.all_timezones, pytz.all_timezones))``

See full list in:


Default: ``False``

0 comments on commit 9c3f71c

Please sign in to comment.