"""Custom registration backend

Collects additional information when registering the user

"""

from django.contrib.auth import login

def login_on_activation(sender, user, request, **kwargs):
    """
    Log the user in after successful account activation
    
    In order to enable this behavior, one needs to connect this
    function to the ``registration.signals.user_activated`` signal.

    """
    user.backend = 'storybase_user.auth.backends.EmailModelBackend'
    login(request, user)

28a73d0a7626e3d4d0dd09d1d17079b04977c32a
<mask token>

<mask token>


def login_on_activation(sender, user, request, **kwargs):
    """
    Log the user in after successful account activation
    
    In order to enable this behavior, one needs to connect this
    function to the ``registration.signals.user_activated`` signal.

    """
    user.backend = 'storybase_user.auth.backends.EmailModelBackend'
    login(request, user)

<mask token>
from django.contrib.auth import login


def login_on_activation(sender, user, request, **kwargs):
    """
    Log the user in after successful account activation
    
    In order to enable this behavior, one needs to connect this
    function to the ``registration.signals.user_activated`` signal.

    """
    user.backend = 'storybase_user.auth.backends.EmailModelBackend'
    login(request, user)

"""Custom registration backend

Collects additional information when registering the user

"""

from django.contrib.auth import login

def login_on_activation(sender, user, request, **kwargs):
    """
    Log the user in after successful account activation
    
    In order to enable this behavior, one needs to connect this
    function to the ``registration.signals.user_activated`` signal.

    """
    user.backend = 'storybase_user.auth.backends.EmailModelBackend'
    login(request, user)
