#NEWLINE# def clean_email( self ) : #NEWLINE# #INDENT# '\n        Check whether the email is in the system.  If it is registered\n        to a closed account, send the user a reactivation link.\n        ' #NEWLINE# email = self . cleaned_data [ 'email' ] #NEWLINE# user = get_user ( email ) #NEWLINE# if user : #NEWLINE# #INDENT# if user . is_closed : #NEWLINE# #INDENT# invite_user_to_reactivate_account ( user , request = self . request ) #NEWLINE# raise forms . ValidationError ( _ ( 'This email address is already registered to another (closed) account. To reactivate this account, please check your email inbox. To register a new account, please use a different email address.' ) , code = 'email_registered_to_closed_account' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise forms . ValidationError ( _ ( 'Sorry, this email address is already registered to another user.' ) , code = 'email_already_registered' ) #NEWLINE# #UNINDENT# #UNINDENT# return user