1 2 3 4 | def login_on_activation(sender, user, request, **kwargs):
user.backend='django.contrib.auth.backends.ModelBackend'
login(request,user)
user_activated.connect(login_on_activation)
|
More like this
- Django Registration without username by newmaniese 3 years, 10 months ago
- Using manager methods by ubernostrum 4 years, 11 months ago
- Trigger a user password change by jedie 4 years, 5 months ago
- Log in a user without requiring credentials by SmileyChris 2 years, 8 months ago
- Simple E-mail registration by bthomas 3 years, 2 months ago
Comments
I was just looking for this. Thanks.
#
Just a note: This requires the unreleased version of django-registration. The version that's released on PyPI (and that you will get via pip), doesn't appear to emit signals.
#
Need a little help? What is 'sender' in this function? My thoughts were to call this function from with the registration.activate view.
#