#NEWLINE# def create_inactive_user( self , username , password , email , locale = settings . LANGUAGE_CODE , text_template = None , html_template = None , subject = None , email_data = None , volunteer_interest = False , **kwargs ) : #NEWLINE# #INDENT# '\n        Create a new, inactive ``User`` and ``Profile``, generates a\n        ``RegistrationProfile`` and email its activation key to the\n        ``User``, returning the new ``User``.\n        ' #NEWLINE# new_user = User . objects . create_user ( username , email , password ) #NEWLINE# new_user . is_active = False #NEWLINE# new_user . save ( ) #NEWLINE# Profile . objects . create ( user = new_user , locale = locale ) #NEWLINE# registration_profile = self . create_profile ( new_user ) #NEWLINE# self . send_confirmation_email ( registration_profile , locale , html_template , subject , email_data , ** kwargs ) #NEWLINE# if volunteer_interest : #NEWLINE# #INDENT# statsd . incr ( 'user.registered-as-contributor' ) #NEWLINE# group = Group . objects . get ( name = CONTRIBUTOR_GROUP ) #NEWLINE# new_user . groups . add ( group ) #NEWLINE# #UNINDENT# return new_user