#NEWLINE# def get_user_from_request( self , request ) : #NEWLINE# #INDENT# user = self . authenticate ( request . session . get ( 'username' ) , request . session . get ( 'password' ) , True ) #NEWLINE# if ( request is None ) : #NEWLINE# #INDENT# logger . debug ( 'Login failed from session %s' , request . session ) #NEWLINE# user = AnonymousUser . instance ( ) #NEWLINE# #UNINDENT# return user