#NEWLINE# def new_user( sender , instance , **kwargs ) : #NEWLINE# #INDENT# if instance . verified : #NEWLINE# #INDENT# for join_invitation in JoinInvitation . objects . filter ( contact__email = instance . email ) : #NEWLINE# #INDENT# if ( join_invitation . status not in [ '5' , '7' ] ) : #NEWLINE# #INDENT# join_invitation . status = '7' #NEWLINE# join_invitation . save ( ) #NEWLINE# #UNINDENT# #UNINDENT# for contact in Contact . objects . filter ( email = instance . email ) : #NEWLINE# #INDENT# contact . users . add ( instance . user )