<s> from django . conf import settings <EOL> from django . contrib . auth import login , get_backends <EOL> from django . dispatch import Signal <EOL> user_registered = Signal ( providing_args = [ "<STR_LIT:user>" , "<STR_LIT>" ] ) <EOL> user_activated = Signal ( providing_args = [ "<STR_LIT:user>" , "<STR_LIT>" ] ) <EOL> def login_user ( sender , user , request , ** kwargs ) : <EOL> """<STR_LIT>""" <EOL> backend = get_backends ( ) [ <NUM_LIT:0> ] <EOL> user . backend = "<STR_LIT>" % ( backend . __module__ , backend . __class__ . __name__ ) <EOL> login ( request , user ) <EOL> request . session [ '<STR_LIT>' ] = True <EOL> request . session . modified = True <EOL> if getattr ( settings , '<STR_LIT>' , False ) : <EOL> user_activated . connect ( login_user ) </s>
