#NEWLINE# def default_register_callback( form , email ) : #NEWLINE# #INDENT# data = form . cleaned_data #NEWLINE# user = User ( ) #NEWLINE# user . first_name = data [ 'first_name' ] #NEWLINE# user . is_active = False #NEWLINE# user . email = email . email #NEWLINE# user . set_password ( form [ 'password1' ] ) #NEWLINE# user . save ( ) #NEWLINE# user . username = ( 'id_%d_%s' % ( user . id , user . email ) ) [ : get_max_length ( User , 'username' ) ] #NEWLINE# user . save ( ) #NEWLINE# email . user = user