#NEWLINE# def authenticate( email = None , password = None ) : #NEWLINE# #INDENT# '\n    Authenticates the user based on the email field \n    and sets the backend information\n    ' #NEWLINE# try : #NEWLINE# #INDENT# backend = EmailBackend ( ) #NEWLINE# user = backend . authenticate ( email = email , password = password ) #NEWLINE# #UNINDENT# except TypeError : #NEWLINE# #INDENT# return None #NEWLINE# #UNINDENT# if user : #NEWLINE# #INDENT# user . backend = ( '%s.%s' % ( backend . __module__ , backend . __class__ . __name__ ) ) #NEWLINE# #UNINDENT# return user